Docker Community Forums

Share and learn in the Docker community.

Unable to add Google Container Registry as third party repository


(Sam) #1

I have my container images hosted in Google Container Registry, they support the regular v2 Docker Registry API, which is authenticated using a static username _json_key and a json file as a string used as a password.

For example, once an service account has been created in Googles Console, the following command works (where the .json document is the file you download from the Google Console when you have created the user):

docker login -e not@used.com -u _json_key -p "$(cat Service-Account-1.json)" https://eu.gcr.io
docker pull eu.gcr.io/my-account/my-image

Docker will download the specified image and behave normally.

However, when adding the 3rd party registry via the web interface, I get a Not Authorized error.

Sample Data:
Repository Name: eu.gcr.io/my-account/my-image
Username: _json_key
Password: <json string ...>

The failure must be within Docker Cloud as the ‘password’ works and can connect, the json document is just contains a few attributes and a private certificate key, just a few lines of text basically.

The only error shown is

Cannot authenticate with eu.gcr.io: Not Authorized.


(Pajn) #2

We’re having the same problem. Has anyone found a solution since this post?