JSantos
JSantos

Reputation: 1708

Access denied pushing images to gcr repository

No matter what I do I can't push images to google repository. I followed this guide and I do these commands directly from the google cloud shell

docker build -t eu.gcr.io/[project-id]/[imagename]:[tag] ~/[folder]
docker tag eu.gcr.io/[project-id]/[imagename]:[tag] eu.gcr.io/[project-id]/[imagename]:[tag]
docker push eu.gcr.io/[project-id]/[imagename]:[tag]

I get this output when pushing

4d1ea31bd998: Preparing
03b6a2b0817c: Preparing
104044bed4c7: Preparing
2222fefcbbfc: Preparing
75166708bd17: Preparing
5eefc1b802bb: Waiting
5c33df241050: Waiting
ffc4c11463ee: Waiting
denied: Unable to access the repository, please check that you have permission to access it.

I've search for this online but everyone seems to have authentication issues. Since I can't execute this neither from my local machine or the google cloud shell I don't think there's a problem there since when I'm on the shell I'm using the owner account [owner]@[project-id]. I have billing and Container Registry API active

From my understanding pushing should create a bucket for this but I even tried creating a bucket but I have no idea if and how to configure it to be used for image repository. I have billing and Container Registry API activated

Upvotes: 4

Views: 2085

Answers (1)

mbuechmann
mbuechmann

Reputation: 5770

You probably did not authenticate with the registry. Please try to login before pushing. Just type in the console and enter your credentials:

docker login eu.gcr.io

Upvotes: 4

Related Questions