简体   繁体   English

在谷歌云上部署 node.js 应用程序时遇到错误

[英]Facing error while deploying node.js app on google cloud

I am trying to deploy node.js app on google cloud but getting following error.我正在尝试在谷歌云上部署node.js应用程序,但出现以下错误。 I am facing this error since 10th October.我从 10 月 10 日起就面临这个错误。 don't know how to resolve:不知道怎么解决:

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 : 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'

I believe you should grant the Service Account User permission to my CI/CD service account.我相信您应该授予我的 CI/CD 服务帐户的Service Account User权限。

You can use the console UI or gcloud command:您可以使用控制台 UI 或 gcloud 命令:

Granting, changing, and revoking access to resources 授予、更改和撤销对资源的访问权限

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}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将 node.js 应用程序部署到谷歌云平台时找不到模块“yargs”错误 - Cannot find module 'yargs' error while deploying node.js app to google cloud platform 我正在尝试将 Node.js 应用程序部署到 Google Cloud Platform,但在使用 MongoDB 时遇到错误 - I'm trying to deploy Node.js app to Google Cloud Platform but catching error with MongoDB 如何在 App Engine 标准环境 (Node.js) 中设置 Google Cloud 错误报告? - How to setup Google Cloud Error Reporting in App Engine standard environment (Node.js)? 在Google Cloud Platform上部署Flask应用时出错 - Error while deploying Flask app on Google Cloud Platform 如何在谷歌云上托管 node.js 应用程序? - How to host node.js app on google cloud propertly? 为 Google Cloud App Engine 灵活指定 Node.js 版本 - Specifying Node.js version for Google Cloud App Engine Flexible 错误:(gcloud.app.deploy)错误响应:[5]无法在全局作业中获取云区域(在部署节点js代码时) - ERROR: (gcloud.app.deploy) Error Response: [5] Cannot get cloud region in global job (while deploying node js code) 将Google Cloud App Engine上的Node.js应用程序连接到Google Cloud SQL实例 - Connecting Node.js app on Google Cloud App Engine to a Google Cloud SQL instance 将Node.js应用程序部署到Google App Engine时出现“找不到模块” - “Cannot find module” when deploying Node.js app to Google App Engine 在Google Cloud Platform上部署应用程序时出错 - Error while deploying an application on google cloud platform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM