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

Viewed 3705

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?

2 Answers

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.

Related