Docker – Fixing error storing credentials

Advertisements

After using Docker Desktop for a long time, it was needed to move to another alternative (Docker Desktop is not free any more for some companies). So, proceeding to install the docker package manually, on this case using homebrew on mac.

An error started to occur when pulling docker images from a repository (docker-hub, internal repositories, ECR, etc). The same error occurred when trying to login on docker docker login -u <username>.

Error saving credentials: error storing credentials - err: exec: "docker-credential-desktop":
executable file not found in $PATH, out: ``

Verify the content of the file ~/.docker/config.json . It seems Docker Desktop uses an entry credsStore but docker installed from homebrew uses credStore.

Advertisements

Just open a text editor and modify the corresponding file of the content.

{
	"auths": {
		.....
	},
	"credStore": "desktop",
	"currentContext": "......."
}

Easy piece!!! The error was fixed.

The same issue happens if moving from docker to Docker Desktop, but the inverse. You need to change credStore to credsStore

References

Advertisements

3 comments

  1. Could you elaborate on how you installed docker with homebrew?
    was is just as simple as brew install docker ?

Leave a Reply

Your email address will not be published. Required fields are marked *