Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCP container push not working - "denied: Please enable Google Container Registry API in Cloud Console at ..."

I'm having trouble uploading my docker image to GCP Container registry. I was following the instructions here.

As you can see in the screenshot below, I've:

  1. Logged into my google cloud shell and built a docker image via a dockerfile
  2. Tagged my image correctly (I think)
  3. Tried to push the image using the correct command (I think)

Docker push to GCP screenshot

However, I'm getting this error: denied:

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.

When I follow that link, it takes me to the wrong project:

enter image description here

When I select my own project, I can see that "Google Container Registry API" is indeed enabled:

enter image description here

How do I upload my docker images?

like image 628
user952342 Avatar asked Nov 27 '17 21:11

user952342


People also ask

What is Google Cloud Container registry?

Container Registry is a service for storing private container images. It provides a subset of features provided by Artifact Registry, a universal repository manager and the recommended service for managing container images and other artifacts in Google Cloud.


Video Answer


2 Answers

I seems that you mistype you project ID. You project name is BensTestsProject but ID is bentestproject-184220.

like image 77
Oleg Sviderskij Avatar answered Oct 09 '22 14:10

Oleg Sviderskij


I have the same issue and solved it. In my case the project name in the image tag was wrong. you must be re-check your "bentestproject-184220" in your image tag is correctly your projectID.

like image 42
Kampanat Metawuthinun Avatar answered Oct 09 '22 16:10

Kampanat Metawuthinun