So I'm trying to push my docker image to gcr.io/docker-url, but it's not working. I've tried the documentation that Google has, but that's still failed (https://cloud.google.com/container-registry/docs/advanced-authentication#standalone_docker_credential_helper). I also tried:
docker login gcr.io
and
docker login us.gcr.io
Here's the command I run and my error:
docker push gcr.io/docker-url/jenkins/container
The push refers to repository [gcr.io/docker-url/jenkins/container]
d7ab52d2e8be: Pushing [==================================================>] 2.56kB
fae569eb21a4: Pushing 1.536kB
7a20d9096c74: Pushing [====> ] 735.7kB/7.854MB
a26d457fd72d: Pushing [> ] 60.93kB/6.055MB
36f2fac55108: Pushing [> ] 502.8kB/49.16MB
4cd936335289: Waiting
f1b5933fe4b5: Waiting
denied: Access denied.
For reference, I used the json file to login. I even tried all of the StackOverflow answers I could find, but no luck there, either.
docker login -u oauth2accesstoken -p "$(gcloud auth print-access-token)" https://gcr.io
– manasouza Jun 21 '19 at 20:16