【问题标题】:GCP container push not working - "denied: Please enable Google Container Registry API in Cloud Console at ..."GCP 容器推送不起作用 - “拒绝:请在 Cloud Console 中启用 Google Container Registry API ...”
【发布时间】:2018-06-07 14:18:44
【问题描述】:

我在将 docker 映像上传到 GCP Container 注册表时遇到问题。我在关注instructions here

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

  1. 登录我的 google cloud shell 并通过 dockerfile 构建 docker 映像
  2. 正确标记了我的图像(我认为)
  3. 尝试使用正确的命令推送图像(我认为)

但是,我收到此错误: 拒绝:

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.

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

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

如何上传我的 docker 图像?

【问题讨论】:

  • 好像推送到了错误的项目...确保您首先使用“gcloud config set project ”在 Cloud Shell 中设置正确的项目。

标签: docker google-cloud-platform gcp


【解决方案1】:

我似乎错误地输入了您的项目 ID。您的项目名称是 BensTestsProject,但 ID 是 bentestproject-184220。

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-29
      • 2017-11-09
      • 2016-07-06
      • 1970-01-01
      • 2017-07-02
      • 1970-01-01
      • 1970-01-01
      • 2020-10-03
      相关资源
      最近更新 更多