I have been using Docker for quite some while on Linux and I have been using gcr.io private repositories for pre-building certain images periodically. I am now testing moving my development environment to Windows.
It seems Docker for Windows cannot log in to gcr using gcloud tools. Using the tools:
C> gcloud docker -a
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
Short-lived access for [‘gcr.io’, ‘us.gcr.io’, ‘eu.gcr.io’, ‘asia.gcr.io’, ‘b.gcr.io’, ‘bucket.gcr.io’, ‘appengine.gcr.io’] configured.
C> docker pull gcr.io/private-repo/private-image
Pulling repository gcr.io/private-repo/private-image
Error: Status 403 trying to pull repository private-repo/private-image: “Unable to access the repository: private-repo/private-imagese verify that it exists and you have permission to access it (no valid credential was supplied).”
I have also tried to manually authenticate - i.e.
C> gcloud auth print-access-token
ya…dA
C> docker login -e account@domain.com -u oauth2accesstoken -p “ya…dA” https://gcr.io
Warning: ‘-e’ is deprecated, it will be removed soon. See usage.
Login Succeeded
C> docker pull gcr.io/private-repo/private-image
Pulling repository gcr.io/private-repo/private-image
Error: Status 403 trying to pull repository private-repo/private-image: “Unable to access the repository: private-repo/private-imagese verify that it exists and you have permission to access it (no valid credential was supplied).”
I have been using the repos and gcloud + docker tools for at least a year on Linux, I have also doublechecked all the account names. I am 100% sure that what I am doing is correct.
Obviously my account and repository information was removed from snippets.
Is there any way in which I can check if the credentials are properly stored? I already found out I cannot SSH to the VM in Hyper-V. Is there any other way to troubleshoot it?