Docker推送时的权限问题

问题描述 投票:0回答:1

我正在尝试将我的docker镜像推送到谷歌容器图像注册表,但得到一个错误,表示我没有执行此操作所需的权限。

我已经尝试过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 docker-image
1个回答
0
投票

谷歌云服务有特定的信息如何授予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

© www.soinside.com 2019 - 2024. All rights reserved.