Whenever I attempt to push a container to the Google Container Registry from my local machine, I get the following error:
denied: Unable to access the repository; please check that you have permission to access it.
If I open the Cloud Shell, I can push containers with no problems. I have tried doing "gcloud auth login" several times and it seems to make no difference. I don't have any problems running other gcloud commands locally. Any help would be greatly appreciated.
FYI for other customers running into similar issues: https://github.com/docker/docker/issues/22910
There exists a bug with current versions of the Docker client (1.11, 1.12), and the default credential stores which are being enabled on new installations, which break private registries. Removing the
"credsStore": "whatever"
field from your docker config (e.g. ~/.docker/config.json) and running
gcloud docker ...
should fix the issue.
Update:
Alternately, we've implemented a credential helper of our own which solves the problem for our customers (i.e. doesn't get tripped up by the lack of a scheme in the GCR URLs that the Docker client uses to request credentials). To install the credential helper:
gcloud components install docker-credential-gcr
ordocker-credential-gcr configure-docker
to configure to the Docker clientHave you run gcloud auth login?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With