Google Container Registry giving 'Access Denied' when trying to push Docker container 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 [==================================================&gt;]   2.56kB
fae569eb21a4: Pushing  1.536kB
7a20d9096c74: Pushing [====&gt;                                              ]  735.7kB/7.854MB
a26d457fd72d: Pushing [&gt;                                                  ]  60.93kB/6.055MB
36f2fac55108: Pushing [&gt;                                                  ]  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.
In case anyone else is running into this issue and can't figure it out, I fixed it by running this command:

gcloud auth activate-service-account --key-file key-file.json


And then ran my docker push command and it pushed through.