gpt4 book ai didi

docker - docker push 时的权限问题

转载 作者:行者123 更新时间:2023-12-02 17:32:14 25 4
gpt4 key购买 nike

我正在尝试将我的 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

最佳答案

谷歌云服务有具体信息如何为 docker push 授予权限,我认为这是你应该看的第一件事,https://cloud.google.com/container-registry/docs/access-control

在检查您是否有足够的权限后,您应该继续进行身份验证,例如:

gcloud auth configure-docker

在此处查看更多信息: https://cloud.google.com/container-registry/docs/pushing-and-pulling

关于docker - docker push 时的权限问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55446787/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com