无法将图片推送到Google容器注册表-调用者没有权限"storage.buckets.get" [英] Can't push image to google container registry - Caller does not have permission 'storage.buckets.get'

查看:94
本文介绍了无法将图片推送到Google容器注册表-调用者没有权限"storage.buckets.get"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个用于将图像推送到gc容器注册表的bitbucket管道. 我已经创建了一个具有Storage Admin角色的服务帐户. (bitbucket-authorization@mgcp-xxxx.iam.gserviceaccount.com)

I am working on a bitbucket pipeline for pushing image to gc container registry. I have created a service account with Storage Admin role. (bitbucket-authorization@mgcp-xxxx.iam.gserviceaccount.com)

gcloud auth activate-service-account --key-file key.json
gcloud config set project mgcp-xxxx
gcloud auth configure-docker --quiet
docker push eu.gcr.io/mgcp-xxxx/image-name

尽管登录成功,但我得到: 项目'mgcp-xxxx'的令牌交换失败.呼叫者没有权限"storage.buckets.get". 要配置权限,请按照以下说明进行操作: https://cloud.google.com/container -registry/docs/access-control

Although that the login is successful, i get: Token exchange failed for project 'mgcp-xxxx'. Caller does not have permission 'storage.buckets.get'. To configure permissions, follow instructions at: https://cloud.google.com/container-registry/docs/access-control

任何人都可以对我所缺少的东西提出建议吗?

Can anyone advice on what i am missing?

谢谢!

推荐答案

过去,我有另一个具有相同名称和不同权限的服务帐户. 发现服务帐户名称已缓存后,我创建了一个具有不同名称的新服务帐户,并且该帐户已正常推送.

In the past I had another service account with same name and different permissions. After discovering that service account names are cached, I created a new service account with different name and it's pushing properly.

这篇关于无法将图片推送到Google容器注册表-调用者没有权限"storage.buckets.get"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆