Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix docker login error: Error saving credentials

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.

like image 227
FedFranz Avatar asked Jun 04 '26 07:06

FedFranz


1 Answers

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.

like image 123
FedFranz Avatar answered Jun 07 '26 13:06

FedFranz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!