I'm following Kubernete's getting started guide. Everything went smoothly until I ran
$ gcloud docker push gcr.io/<PROJECT ID>/hello-node:v1
(Where is, well, my project id). For some reason, Kubernetes is not able to push to the registry. This is what I get:
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
Warning: '--email' is deprecated, it will be removed soon. See usage.
Login Succeeded
The push refers to a repository [gcr.io/kubernetes-poc-1320/hello-node]
18465c0e312f: Preparing
5f70bf18a086: Preparing
9f7afc4ce40e: Preparing
828b3885b7b1: Preparing
5dce5ebb917f: Preparing
8befcf623ce4: Waiting
3d5a262d6929: Waiting
6eb35183d3b8: Waiting
denied: Unable to create the repository, please check that you have access to do so.
Any ideas on what I might be doing wrong? Note that I have run. $ gcloud init
, so I've logged in.
Thanks in advance!
Ensure you are authenticated with Google Cloud.
Double-check
gcloud
is pointing to your current project.If you still have trouble, run
gcloud info
and take a look at theLast Log File
. Note:gcloud auth login
no longer writes application default credentials.Edit: This worked for me months ago. New versions of Kubernetes might not have this problem, or this solution might not solve it :)
Ok, after struggling for hours with this, I finally managed to push it to th grc.io registry by changing my tag from a
image:version
notation toimage/version
, like this:gcloud docker push gcr.io/<PROJECT ID>/hello-node/v1
after reading another guide from Kubernetes' documentation: https://cloud.google.com/container-registry/docs/pushing#pushing_to_the_registry
Hope this helps!
None of the above solutions worked for me and I finally found out a solution. I'm using Windows 10 and looked at my C:/Users//.docker/config.json file and it looked like this.
Removing the "credsStore": "wincred" line fixed the problem!
I was getting this same error because I was accidentally using the project name rather than the auto-generated id. The
PROJECT_ID
can be found via:as well as in the Google Cloud dashboard: https://console.cloud.google.com/home/dashboard
Silly, I realize, but I can imagine others making the same mistake :)
When using docker-credential-helpers to store docker credentials in the OSX Keychain,
gcloud docker -- push $registry/$project_id/<image>:<tag>
fails as well.Solution for me was to revert
~/.docker/config.json
to not store credentials securely with the keychainSee also: https://github.com/GoogleCloudPlatform/gcloud-common/issues/198