I am having troubling passing credentials for docker hub so that I can push the built image.
Anyone have any ideas? I have tried hard encoding username: blah and password: blah into the drone.yml and this doesn’t work. I have also tried using docker_username and docker_password which is what the plugins/docker is expecting and still doesn’t want to play ball.
Can anyone spot what I am doing wrong? I would be extremely grateful if anyone could point out why this is failing. Worst case I could probably do manual docker commands to do it via script but would prefer to use the provided drone official plugin.
I am also running drone 0.8.2 which afaik is the latest stable/official release.
I have tried many different configs/changes but these were the only ones I still had lying around.
The only thing I can see which is different is the tags: line but in all honestly latest should be automatically used so I cant see how this will help. Never the less I will give it a shot shortly and let you know. Thanks for the info.
The error message is quite clear that its not getting the credentials to upload the repo. This you can see at the top of the logs.
Thank you very much, this is working great now. The only thing I would like to ask is, what if the git repo is different than the final docker registry?
i.e. github repo url/name: majestic/project1 but the docker hub is say bob/project1 or even a totally different project name?
The only thing I would like to ask is, what if the git repo is different than the final docker registry?
The docker plugin does not use the git repository name in any way, so the fact that your git repository name does not match your docker repository name is not a problem.
In fact, nearly every image I publish uses a different registry name. See for example github.com/drone-plugins/drone-slack which publishes to plugins/slack in dockerhub: