gcloud - 错误:(gcloud.app.deploy) 获取应用程序的权限错误 [英] gcloud - ERROR: (gcloud.app.deploy) Permissions error fetching application

查看:38
本文介绍了gcloud - 错误:(gcloud.app.deploy) 获取应用程序的权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在谷歌云上部署 node js 应用程序,但出现以下错误 -

I am trying to deploy node js app on google cloud but getting following error -

Step #1: ERROR: (gcloud.app.deploy) Permissions error fetching application [apps
/mytest-240512]. Please make sure you are using the correct project ID and that
you have permission to view applications on the project.

我正在运行以下命令 -

I am running following command -

gcloud builds submit . --config cloudbuild.yaml

我的 cloudbuild.yaml 文件看起来像 -

My cloudbuild.yaml file looks like -

steps:
  #install
  - name: 'gcr.io/cloud-builders/npm'
    args: ['install']

   #deploy
  - name: 'gcr.io/cloud-builders/gcloud'
    args: ['app', 'deploy']

推荐答案

默认的 Cloud Build 服务帐户不允许访问部署 App Engine.您需要启用 Cloud Build 服务帐号才能执行部署等操作.

The default Cloud Build service account does not allow access to deploy App Engine. You need to enable the Cloud Build service account to perform actions such as deploy.

Cloud Build 服务帐户的格式如下:

The Cloud Build service account is formatted like this:

[PROJECT_NUMBER]@cloudbuild.gserviceaccount.com

  • 转到 Google Cloud Console -> IAM &管理员 -> IAM.
  • 找到服务帐户并点击铅笔图标.
  • 将App Engine Deployer"角色添加到服务帐户.
  • 等待几分钟让服务帐户全局更新,然后重试.

    Wait a couple of minutes for the service account to update globally and then try again.

    这篇关于gcloud - 错误:(gcloud.app.deploy) 获取应用程序的权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆