相关疑难解决方法(0)

docker push 时的权限问题

我正在尝试将我的 docker 映像推送到 google 容器映像注册表,但收到一条错误消息,指出我没有执行此操作所需的权限。

我已经尝试过 gcloud auth configure-docker 但它对我不起作用。

我首先使用以下命令构建映像: docker build -t gcr.io/trynew/hello-world-image:v1 。

然后我试图附加一个标签并推送它: docker push gcr.io/trynew/hello-world-image:v1

这是我的输出:

    The push refers to repository [gcr.io/trynew/hello-world-image]

    e62774cdb1c2: Preparing 
    0f6265b750f3: Preparing 
    f82351274ce3: Preparing 
    31a16430afc8: Preparing 
    67298499a3ed: Preparing 
    62d5f39c8fe4: Waiting 
    9f8566ee5135: Waiting 
    unauthorized: You don't have the needed permissions to perform this
    operation, and you may have invalid credentials. 
    To authenticate your request, follow the steps in: 
https://cloud.google.com/container-registry/docs/advanced-authentication
Run Code Online (Sandbox Code Playgroud)

docker docker-image

19
推荐指数
6
解决办法
1万
查看次数

Google Container Registry 权限

我正在尝试将 docker 映像推送到 GCP,但我仍然收到此错误:

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication
Run Code Online (Sandbox Code Playgroud)

我一步一步地遵循这个https://cloud.google.com/container-registry/docs/quickstart一切正常,直到 docker push

很明显 GCP 项目

我已经试过了:

  1. 使用 gcloud 作为 Docker 凭证助手: gcloud auth configure-docker
  2. 重新安装 Cloud SDK 和 gcloud init
  3. 存储管理员角色添加到我的帐户

我做错了什么?

感谢您的任何建议

permissions docker google-cloud-platform google-container-registry

3
推荐指数
1
解决办法
2612
查看次数

无权推送到 GCR - 但我是该项目的所有者

推到eu.gcr.io/my-project-name/my-image:tag,我得到:

unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

我安装了 gcloud,当我使用 时gcloud auth list,我看到所选帐户是项目的所有者。

我已经运行gcloud auth configure-docker并且我的 Docker 配置文件包含gcloud作为凭证助手,因此。我已经确认 docker 正在使用相同的配置,因为如果我暂时清空配置,则会docker push出现不同的错误。

我也用过:

docker login -u oauth2accesstoken -p 'token_here' https://eu.gcr.io通过gcloud auth print-access-token.

这是一台新的笔记本电脑,用户之前可以推送到注册表...我很迷茫。

版本:

Google Cloud SDK 310.0.0
bq 2.0.60
core 2020.09.11
gsutil 4.53


Client: Docker Engine - Community …
Run Code Online (Sandbox Code Playgroud)

docker google-cloud-platform

0
推荐指数
2
解决办法
1221
查看次数