GCP容器推送不起作用 - “拒绝:请在云控制台中启用Google容器注册表API ...”

问题描述 投票:5回答:2

我将docker镜像上传到GCP Container注册表时遇到问题。我跟随instructions here

正如您在下面的屏幕截图中看到的,我:

  1. 登录我的谷歌云外壳并通过dockerfile构建了一个docker镜像
  2. 正确标记我的图像(我认为)
  3. 尝试使用正确的命令推送图像(我认为)

Docker push to GCP screenshot

但是,我收到了这个错误:拒绝:

Please enable Google Container Registry API in Cloud Console at https://console.cloud.google.com/apis/api/containerregistry.googleapis.com/overview?project=bentestproject-184220 before performing this operation.

当我关注该链接时,它会将我带到错误的项目:

enter image description here

当我选择自己的项目时,我可以看到确实启用了“Google Container Registry API”:

enter image description here

如何上传我的泊坞窗图片?

docker google-cloud-platform gcp
2个回答
14
投票

我好像你错了你的项目ID。您的项目名称是BensTestsProject,但ID是bentestproject-184220。


2
投票

我有同样的问题并解决了它。在我的情况下,图像标签中的项目名称是错误的。你必须重新检查你的图像标签中的“bentestproject-184220”是否正确你的projectID。

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