Skip to content

Docker – Error storing credentials – err: exec: “docker-credential-desktop”: executable file not found in $PATH, out: Naveen (NNK) Spark By {Examples}

  • by

How to resolve the Docker login error Error saving credentials: error storing credentials – err: exec: “docker-credential-desktop”: executable file not found in $PATH, out:” when trying to log in to the Docker hub or local container image library by using docker login -u command.

This issue probably occurs if you try to install docker from CLI and don’t have docker desktop installed. By default, docker configures with desktop mode hance you need

Solution 1: Replace or Delete credsStore from config.json file.

There are several ways to resolve this issue. One easiest way would be making any of the following changes in ~/.docker/config.json file.

Replace “credsStore” by “credStore” as many people suggest.

Replace “credsStore” by any value.

Delete “credsStore” property from the config.

I would prefer using the last option which is deleting the credsStore entry from the file.

After removing an entry the file looks like below.

Now try to log in again and you should not see the Docker error Error saving credentials: error storing credentials – err: exec: “docker-credential-desktop”: executable file not found in $PATH, out:”

For now, ignore the warning.

Note: On the internet, you pretty much find replace credsStore with credStore as a solution, however, the credStore is not a valid config key, so the only reason this works is because you are deleting the credStore entry. Hence, it’s better to just delete it so that it’s not misleading in the future if you are reviewing your config.

By default credsStore points to the desktop, this requires a docker desktop to be installed. When removing “s” or deleting property, docker will be in WSL and cannot locate credsStore property so they will use the default docker credential in Linux.

Solution 2:

Conclusion

In this article, you have learned different ways to resolve Docker login error Error storing credentials – err: exec: “docker-credential-desktop”: executable file not found in $PATH, out:. For example, replace credsStore with any value on ~/.docker/config.json file.

 How to resolve the Docker login error “Error saving credentials: error storing credentials – err: exec: “docker-credential-desktop”: executable file not found in $PATH, out:” when trying to log in to the Docker hub or local container image library by using docker login -u command. This issue probably occurs if you try to install docker from  Read More Docker 

Leave a Reply

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