我正在尝试将我的 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 映像推送到 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 项目
我已经试过了:
gcloud auth configure-dockergcloud init我做错了什么?
感谢您的任何建议
permissions docker google-cloud-platform google-container-registry
推到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)