docker-credential-helpers: Docker login command accesses random KeyChain entries and fails
Duplicated from https://github.com/docker/for-mac/issues/1540 Adding here to hopefully get more visibility.
Expected behavior: Running the command docker login -u USER -p PASS HOST:8443 should login to the specified repo.
Unexpected behavior: Running the above command causes docker to ask to access the KeyChain for a randomly chosen entry. If I deny the request, then the command fails with: “error getting credentials - err: exit status 1, out: The user name or passphrase you entered is not correct.” If I allow the request, then the command fails with: “Error saving credentials: error storing credentials - err: exit status 1, out: The specified item already exists in the keychain.”
Could be related to issue #47, but I believe that has already been resolved. I also tried downloading docker-credential-osxkeychain v0.5.0 and replacing /usr/local/bin/docker-credential-osxkeychain with that release and I had the same issue.
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 24 (3 by maintainers)
@jeanlaurent I did not, mainly because I wasn’t even aware of
docker-credential-osxkeychainbefore I had this issue 😄 . But correct, I did see the symlink when I reset docker to factory defaults:Then if I run:
docker login my.dockerregistery.com:5002I get the keychain prompting me to use an item that is not my registry. It’s just a random entry, because if I delete this entry, it picks a new one:
and if I hit “Deny”, I get:
error getting credentials - err: exit status 1, out: 'The user name or passphrase you entered is not correct.'I tried then downloading the v0.5.0 release and overwriting the symlink in
/usr/local/bin/and I got the same issue I had above.Finally, if I delete
docker-credential-osxkeychainunder/usr/local/bin/, I get the normal Docker login and it works:This is on macOS 10.12.5 and Docker 17.03.1-ce-mac12 (17661)
rm /usr/local/bin/docker-credential-osxkeychain, and everything get ok.It did not work for me.
error getting credentials - err: exec: “docker-credential-osxkeychain”: executable file not found in $PATH, out: ``
I found super easy solution. Just disabled “Securely store Docker logins in macOS keychain” from Docker’s GUI preferences menu.
I had similar problem:
What didn’t work:
/usr/local/bin/docker-credential-osxkeychain+ docker restart$HOME/.docker/config.json+ docker restartKeychain Accessand click the login lock -> I didn’t have permission to do this actionsWorking solution:
Keychain AccessloginPasswordstab@narek-king thank you, this solution helps me! I’ve disabled this option in GUI preferences and tried
docker login- everything is OK.I came across this problem on macOS High Sierra 10.13.1 (17B48) and Docker 17.09.0-ce-mac35 (19611)。 I follow instructions from docker/for-mac#2228 and it works for me.
if your docker version is 18.09.2, you just removing “credsStore”: “osxkeychain” from ~/.docker/config.json instead, https://github.com/docker/for-mac/issues/2295
On Ubuntu 18.10, the binary needs to be deleted for login to work is
/usr/bin/docker-credential-secretservice. This may break some functionality however.Deleting
/usr/local/bin/docker-credential-osxkeychaindid not work.I ran
brew install docker-credential-helperwhich installed it correctly. No idea where the original (no longer working) binary came from.not work for me; just loop;
1 docker login registry.huilianyi.com username:li… password: Error saving credentials: error storing credentials - err: exit status 1, out:
The user name or passphrase you entered is not correct.2 which docker-credential-osxkeychain output: /usr/local/bin/docker-credential-osxkeychain rm /usr/local/bin/docker-credential-osxkeychain
3 go to docker preferences and click Reset to factory defaults. close terminal open new terminal
4 back to 1
Guys, go to docker preferences and click on Restart, once restarted open new terminal and docker login, it resolved to login succeed. If above did not work then go to docker preferences and click Reset to factory defaults.
Same problem as @bestreaction but after a restart of docker, then it works.
Removing the line
"credsStore" : "osxkeychain"resolved for me:My file
~/.docker/config.jsonwas like below:I removed the last line (
"credsStore" : "osxkeychain") and restarted docker. Then I could login and the file become:i have logout from docker GUI and restart my docker. and then login via GUI with username
dont use emailto login [FIXED]