简体   繁体   English

将 Storage Admin IAM 角色分配给我的服务帐户时出错

[英]Error when assigning the Storage Admin IAM role to my service account

I have the following script ( I've change the AZURE_PIPELINES_PUBLISHER ):我有以下脚本(我已经更改了 AZURE_PIPELINES_PUBLISHER ):

 AZURE_PIPELINES_PUBLISHER=azure-pipelines-publisher@$GOOGLE_CLOUD_PROJECT.iam.gserviceaccount.com gcloud projects add-iam-policy-binding $GOOGLE_CLOUD_PROJECT \ --member serviceAccount:$AZURE_PIPELINES_PUBLISHER \ --role roles/storage.admin

I write this script on 'Arguments' field of the Docker push task, in Azure DevOps, when i run the build, this task shows the following error:我在 Azure DevOps 中 Docker 推送任务的“参数”字段上编写此脚本,当我运行构建时,此任务显示以下错误:

unknown flag: --member未知标志:--member

I get the script from the Google Cloud documentation .我从Google Cloud 文档中获取脚本。

What's wrong in the script?剧本有什么问题?

From the tutorial, gcloud command should run in the Cloud Shell.根据教程, gcloud命令应该在 Cloud Shell 中运行。 It's not 'Arguments' of the Docker push task.这不是 Docker 推送任务的“参数”。 It's supposed creating a Google Cloud service account in your production project and assign the role before you configure Azure Pipelines to build and publish a container image.它应该在您的生产项目中创建一个 Google Cloud 服务帐户并分配角色,然后再配置 Azure 管道以构建和发布容器映像。

暂无
暂无

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

相关问题 如何将 GCP IAM 角色添加到服务帐号 - How to add GCP IAM roles to Service Account 使用自定义服务帐号部署到 Cloud Run 失败并出现 iam.serviceaccounts.actAs 错误 - Deploying to Cloud Run with a custom service account failed with iam.serviceaccounts.actAs error java.io.IOException:获取服务帐户的访问令牌时出错:连接超时,ISS:&lt;&gt;@&lt;&gt;.iam.gserviceaccount.Z4D236D9A2D102C5Z006AD1C50DA4BEC5 - java.io.IOException: Error getting access token for service account: connect timed out, iss: <>@<>.iam.gserviceaccount.com 将IAM服务帐户与Google / cloud-sdk官方图片一起使用 - Use an IAM service account with official google/cloud-sdk image Amazon ECS - 在 Docker 入口点上使用 IAM 角色时权限被拒绝 - Amazon ECS - Permission denied when using IAM role on Docker entrypoint IAM 角色不适用于 Docker 容器? - IAM Role not working with Docker container? 使用gcloud和具有“所有者”权限的服务帐户推送Docker映像时出现“ 500 Internal Server Error” - “500 Internal Server Error” when pushing docker images using gcloud and a service account with “Owner” permission 创建新计算实例时 GCP 中的权限错误,但服务帐户确实具有权限 - Permission error in GCP when creating a new compute instance but service account does have permissions 将IAM角色传递给EC2上的Docker - Passing IAM role to a Docker on EC2 将 IAM 角色传递给 Terraform 的 Docker 容器 - Passing IAM Role to Docker container for Terraform
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM