When trying docker login, I get this error:
Error saving credentials: error storing credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out: ``
I run an Ubuntu 22.04.2 LTS machine.
I tried purging and reinstalling docker from scratch, but didn't solve the issue. I also tried solutions to similar "saving credentials" errors found on StackOverflow, but didn't solve the issue.
Solution
In the file ~/.docker/config.json, change credsStore to credStore (note the missing s).
Explanation
The error seems to be introduced when moving from 'docker' to 'Docker Desktop', and vice-versa.
In fact, Docker Desktop uses an entry credsStore, while docker installed from apt uses credStore.
Extra
This solution also seems to work for the following, similar error:
Error saving credentials: error storing credentials - err: exec: "docker-credential-desktop":
executable file not found in $PATH, out: ``
which may occur when pulling docker images from a repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With