小编fed*_*odr的帖子

gcloud app部署错误需要“vpcaccess.connectors.use”权限

我有 GO 应用程序,并尝试使用 google 命令行 sdk 从具有自定义服务帐户的本地计算机将其部署到 google 应用程序引擎。

\n

我创建一个具有角色的自定义服务帐户:

\n
    \n
  • 应用程序引擎管理员
  • \n
  • 云构建服务帐号
  • \n
  • 云构建服务
  • \n
  • 代理无服务器 VPC 访问用户
  • \n
\n

并使用此帐户进行本地授权:

\n
gcloud auth activate-service-account account_name@project-name.iam.gserviceaccount.com --key-file=key.json\n
Run Code Online (Sandbox Code Playgroud)\n

另外,我在 app.yaml 中配置服务帐户:

\n
service_account: account_name@project-name.iam.gserviceaccount.com\n
Run Code Online (Sandbox Code Playgroud)\n

但是当我尝试部署时

\n
gcloud app deploy -v 1   \n
Run Code Online (Sandbox Code Playgroud)\n

我收到错误:

\n
Beginning deployment of service [default]...\n\xe2\x95\x94\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x97\n\xe2\x95\xa0\xe2\x95\x90 Uploading 0 files to Google Cloud Storage                \xe2\x95\x90\xe2\x95\xa3\n\xe2\x95\x9a\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x90\xe2\x95\x9d\nFile upload done.\nERROR: (gcloud.app.deploy) PERMISSION_DENIED: Operation is not allowed. The "vpcaccess.connectors.use" permission is required.\n
Run Code Online (Sandbox Code Playgroud)\n

我不明白为什么即使我拥有无服务器 VPC …

permissions google-app-engine permission-denied google-cloud-platform

8
推荐指数
2
解决办法
4021
查看次数