Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 在google云上部署node.js应用程序时遇到错误_Google Cloud Platform_Gcloud_Google Cloud Build - Fatal编程技术网

Google cloud platform 在google云上部署node.js应用程序时遇到错误

Google cloud platform 在google云上部署node.js应用程序时遇到错误,google-cloud-platform,gcloud,google-cloud-build,Google Cloud Platform,Gcloud,Google Cloud Build,我试图在谷歌云上部署node.js应用程序,但出现以下错误。我从10月10日起就面临这个错误。不知道如何解决: Step #2: ERROR: (gcloud.beta.app.deploy) PERMISSION_DENIED: You do not have permission to act as '[xxxxxxx]@appspot.gserviceaccount.com' Step #2: - '@type': type.googleapis.com/google.rpc.Resour

我试图在谷歌云上部署
node.js
应用程序,但出现以下错误。我从10月10日起就面临这个错误。不知道如何解决:

Step #2: ERROR: (gcloud.beta.app.deploy) PERMISSION_DENIED: You do not have permission to act as '[xxxxxxx]@appspot.gserviceaccount.com'
Step #2: - '@type': type.googleapis.com/google.rpc.ResourceInfo
Step #2:   description: You do not have permission to act as this service account.
Step #2:   resourceName: [xxxxxx]@appspot.gserviceaccount.com
Step #2:   resourceType: serviceAccount
Finished Step #2
ERROR
ERROR: build step 2 "gcr.io/cloud-builders/gcloud" failed: step exited with non-zero status: 1
CloudBuild.yaml

steps:

- name: node:10.15.1
  entrypoint: npm
  args: ['install']

- name: node:10.15.1
  entrypoint: npm
  args: [ 'run', 'build', '--prod --verbose']

- name: 'gcr.io/cloud-builders/gcloud'
  args: ['beta', 'app', 'deploy', '--version=prod', '--no-cache']


timeout: '4800s'

我相信您应该授予
服务帐户用户对我的CI/CD服务帐户的
权限

您可以使用控制台UI或gcloud命令:

gcloud iam service-accounts add-iam-policy-binding \
    ${PROJECT_ID}@appspot.gserviceaccount.com \
    --member=serviceAccount:${PROJECT_NUMBER}@cloudbuild.gserviceaccount.com \
    --role=roles/iam.serviceAccountUser \
    --project=${PROJECT_ID}