I’m trying to use image plugins/gcr to build and push docker to gcr.io for our project. Drone keeps giving me this error:
Successfully built a30e54b18226
Successfully tagged 115af9cc00fb81d25e903b7246edc0de61426031:latest
+ /usr/local/bin/docker tag 115af9cc00fb81d25e903b7246edc0de61426031 gcr.io/project-id/repo:latest
+ /usr/local/bin/docker push gcr.io/project-id/repo:latest
The push refers to a repository [gcr.io/project-id/repo]
time="2017-12-04T09:59:45.851797448Z" level=error msg="Upload failed: denied: Unable to access the repository, please check that you have permission to access it."
time="2017-12-04T09:59:45.854964304Z" level=info msg="Attempting next endpoint for push after error: denied: Unable to access the repository, please check that you have permission to access it."
denied: Unable to access the repository, please check that you have permission to access it.
time="2017-12-04T09:59:45Z" level=fatal msg="exit status 1"
It seems plugins/gcr use docker push, but I can’t use this command for publishing to gcr. Is there any version of plugins using gcloud docker -- push command to publish docker to gcr?
Thank you for clarification. I tried to use docker login in simple linux environment and it worked! I think it’s the authentication problem. I use drone secret add to inject password to plugins/gcr as below: