Hi there. I’m new to drone, so this is probably a configuration issue, but from what I read, I think I have things configured correctly. The issue is, the image I have builds, but then i get ‘unauthorized: incorrect username or password’ when trying to push to dockerhub. Here are all of the pieces that I’m aware of, and how I have them configured:
And signed the .drone.yml file using drone sign counterbeing/myrepo.
I’m trying to keep my password out of the config file for obvious reasons. The plugins/docker docs show removing the keys for username and password from the config, so I think i did that correctly.
Awesome, that’s already helpful. I wasn’t convinced my environment variables were making it through from my drone secrets. I’ll give local testing a shot, but I know I’m already authenticated… Thanks for helping me bisect the problem
I think perhaps I’m a bit confused about how to use it like this. When I try the following, it builds the image and doesn’t push, so, that’s a good start:
I do have a few questions that seem unanswered by the readme, maybe you know more, but, what’s the DRONE_COMMIT_SHA? Is that a commit sha from my repo? And looking through a little of the source code, it looks like i’m using the ENV vars below correctly to set things like username… anyway
…then, the moment I add the env variables for my username, and/or my password like this
The problem appears to be with my password. It had two special characters in it ^ and >. Changing my password fixed the issue, though, I’m not sure if there’s another solution that doesn’t involve changing passwords. But, I’m happy
Glad you figured it out. I think the use of > could cause problems from the command line because bash interprets > as a special character. I haven’t tested, but quoting the string could solve the issue in this case.