exec: "docker-credential-desktop.exe": executable file not found in $PATH
Asked Answered
R

12

108

I got this error during docker build:

 => ERROR [internal] load metadata for docker.io/library/ubuntu:18.04                                                                                                                                                                   2.1s
------
 > [internal] load metadata for docker.io/library/ubuntu:18.04:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``
Makefile:26: recipe for target 'build-local' failed
make: *** [build-local] Error 1
Rentfree answered 26/1, 2021 at 6:16 Comment(0)
R
422

This discussion solved my error:
https://forums.docker.com/t/docker-credential-desktop-exe-executable-file-not-found-in-path-using-wsl2/100225

Delete the line with credsStore from ~/.docker/config.json.

Or rename credsStore to credStore

Rentfree answered 26/1, 2021 at 6:16 Comment(18)
No clear answer on why does this work and what could be a better way to solve this. This one seems like a hack.Wilcher
feels more like a fixSecern
weird, but this worked for meFumble
This is no different than just deleting the line outright. docker is looking for credsStore not credStore, since it can't find it, it uses it's default -- there is no magic here.Heterochromous
Confirmed fixes the issue.Valina
@birsingh Changing credsStore to credStore simply disables that functionality, docker will then run without credentials.Spaniard
lol, worked for me.Betaine
Renaming the mentioned attribute works.Simulacrum
I had to shift from Docker Desktop to Rancher Desktop. With rancher Desktop I used dockerd & started facing this issue. But this change resolved it well.Weanling
@JavierBuzzi is correct - the documentation is here docs.docker.com/engine/reference/commandline/login/…Tepper
Worked for me... but isn't the whole point of Docker not having to rely on env-dependent configs in additional to the standard commands.Confucius
I got this error on macOS after uninstalling Docker Desktop (formerly Docker for Mac) and switching to just "normal" Docker (brew install docker). It looks like the config was left pointing to Docker Desktop for credentials storage. This answer solved it for me as well.Eurasian
Funnily I had never installed Docker Desktop on my Mac (M1, MacOS 13.5+), but only installed brew install colima docker docker-compose docker-buildx, yet the ~/.docker/config.json had sad wrong line ("credsStore": "desktop") in it. Removing it and trying to log in into my private Docker registry worked afterwards. Before I seemed to be successfully logged-in, but since it could not store the credentials, there was an issue.Lest
Not sure how this works, but it has been a really good solution for my trouble.Document
It worked. I wonder why...Portage
can confirm. it worked for me on wsl with windows 11 without docker desktop.Rauch
Ubuntu 20.04 user here, deleting the credsStore parameter worked for meAnimation
Just wanted to say thank you man!!!! I've been trying to get VS Code devcontainers to work w/ Podman and this did the trick!!Ailssa
A
86
  1. Just goto config sudo vi ~/.docker/config.json
  2. rename credsStore to credStore and save. This actually fixed mine (arch).
Aeolotropic answered 12/11, 2022 at 13:12 Comment(0)
L
28

For me this happened when my org had to switch from docker desktop to colima, so here's detail from owner of colima: https://github.com/abiosoft/colima/issues/52#issuecomment-956037291

───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: ~/.docker/config.json
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │     "credsStore": "desktop".  <----- Delete this line
   3   │ }
───────┴─────────────────────────────────────────────────────────────────

You can delete that line and it should work fine.

Laurentian answered 27/2, 2023 at 5:29 Comment(1)
That should be the accepted answer.Legator
K
14

Short answer: Delete the line with credStore from ~/.docker/config.json.

Long explanation:

The property credsStore specifies an external binary to serve as the default credential store. When this property is set, docker login will attempt to store credentials in the binary specified by docker-credential-<value> which is visible on $PATH. If this property is not set, credentials will be stored in the auths property of the config.

Read more about it https://docs.docker.com/engine/reference/commandline/cli/#credential-store-options.

Credits to @Javier Buzzi, vote up his comment as well.

Kidnap answered 22/2, 2023 at 6:44 Comment(0)
A
7

For Arch Linux edit the ~/.docker/config.json file and paste this code

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

basically change credsStore to credStore

Andreas answered 13/6, 2023 at 12:19 Comment(0)
C
5

today installed and removed docker desktop which is destroyed docker engine, right answer already given:

Delete the line with credsStore from ~/.docker/config.json

Change answered 5/5, 2023 at 19:43 Comment(0)
A
3

I have fixed it on Mac with this:

sudo vim ~/.docker/config.json

rename "credsStore" to "credStore"

Anopheles answered 3/11, 2023 at 8:22 Comment(0)
A
1

In my case, this file docker-credential-desktop was not found because I was running only docker-engine.

To get this file, I had to install the docker-desktop user interface app, and from the docker-desktop, I logged in to my docker hub account. That's how it worked for me.

Aldis answered 28/3, 2023 at 5:35 Comment(0)
T
1

For me, after editing the credsStore line in ~/.docker/config.json, everything works fine. However, in reality, it's equally valid to either delete this line or modify it. In other words, you can change it to credxxxxxxStore, as long as the original credsStore doesn't exist. Perhaps it's related to this issue . [Windows 11, WSL2, Docker Desktop 4.28.0]

Tila answered 5/3, 2024 at 12:47 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Mainsheet
C
0

I ran into the same issue. When I logged into Docker Desktop I saw there was an update [to version 4.27.2] and applied it.

Then I tried building again and it worked.

Hope this helps!

Comprehend answered 15/2, 2024 at 22:17 Comment(0)
M
0

For me i had a different problem. I always used the sudo comand for docker and changed the permissions by adding it to the docker group, logged out and than logged in again and it worked. This is the link i followed: https://www.digitalocean.com/community/questions/how-to-fix-docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socket

Magnification answered 29/2, 2024 at 20:20 Comment(0)
U
0

I've fixed this problem on Ubuntu 22 removing the line with credStore at ~/.docker/config.json

Unconnected answered 26/3, 2024 at 13:48 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Mainsheet

© 2022 - 2025 — McMap. All rights reserved.