【发布时间】:2022-10-15 15:56:33
【问题描述】:
我有一个想从命令行运行的 Cloud Build。但是,当我尝试从终端运行构建时,它会引发此错误:
$ gcloud builds submit --region=asia-east1 --config cloudbuild.yaml
Creating temporary tarball archive of 1 file(s) totalling 96 bytes before compression.
Uploading tarball of [.] to [gs://<REDACTED>.tgz]
ERROR: (gcloud.builds.submit) PERMISSION_DENIED: generic::permission_denied: Permission iam.serviceAccounts.get is required to perform this operation on service account projects/<PROJECT_ID>/serviceAccounts/<MY_SERVICE_ACCOUNT>.
我已将角色 Service Account User 分配给上述服务帐户,以及在我的终端上登录到 gcloud 的用户(通过 gcloud auth 确认)。
我还应该在哪里授予权限iam.serviceAccounts.get?
【问题讨论】:
标签: google-cloud-platform google-cloud-build cloudbuild.yaml