【发布时间】:2021-03-29 13:56:05
【问题描述】:
我正在关注 this 指南并在第 3 步卡住。当我运行时
gcloud artifacts repositories add-iam-policy-binding [myrepo] \
--location us \
--member=serviceAccount:build-robot@[myproject].iam.gserviceaccount.com \
--role=roles/artifactregistry.writer
我收到PERMISSION_DENIED: The caller does not have permission。
gcloud 作为角色/所有者(我自己)运行,所以我绝对有权执行该操作。
我可以为具有角色roles/cloudbuild.builds.builder 的服务帐户添加项目绑定,这很有效(我可以使用 build-robot 服务帐户从工件注册表中推送和拉取图像),但对于我的内容来说过于宽松了想要服务帐户执行此操作。
【问题讨论】:
标签: google-cloud-platform google-cloud-iam