127

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
0

16 Answers 16

510

This discussion solved my error.

You should delete the line with credsStore from ~/.docker/config.json or rename credsStore to credStore.

19
  • 4
    No clear answer on why does this work and what could be a better way to solve this. This one seems like a hack.
    – bir singh
    Commented Jan 18, 2022 at 18:32
  • 1
    feels more like a fix
    – Mikser
    Commented Feb 16, 2022 at 10:16
  • 40
    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. Commented Feb 28, 2022 at 11:10
  • 2
    Confirmed fixes the issue.
    – Rikki
    Commented Mar 26, 2022 at 7:50
  • 3
    @JavierBuzzi is correct - the documentation is here docs.docker.com/engine/reference/commandline/login/…
    – BitByteDog
    Commented Oct 29, 2022 at 6:44
119
  1. Go to config:

    sudo vi ~/.docker/config.json
    
  2. Rename credsStore to credStore and save.

This actually fixed mine (arch).

0
43

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.

3
  • 3
    That should be the accepted answer.
    – Andreas
    Commented Dec 22, 2023 at 12:53
  • I got this problem after switching from docker desktop to regular docker daemon on ubuntu 22
    – Volodymyr
    Commented Jul 18 at 15:13
  • Should be same try finding config.json in similar folder in your system and removing the line or file would fix it Commented Jul 19 at 7:04
20

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.

8

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

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

basically change credsStore to credStore

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

4

I have fixed it on Mac with this:

sudo vim ~/.docker/config.json

rename "credsStore" to "credStore"

2

just run this command

rm -rf ~/.docker 
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.

1

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!

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]

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.
    – Community Bot
    Commented Mar 7 at 18:36
1

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

1
  • 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.
    – Community Bot
    Commented Mar 26 at 22:17
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

0

I've had this error when trying to rebuild a Dev Container in VS Code on Windows.

Turns out, it was due to WSl not started. When I popped up the WSL terminal and retried rebuilding the container, it worked and the error was gone.

0

This solution worked for me on MacOS: try doing "brew install docker-credential-helper".

0

I have faced the same issue from WSL after recent Rancher Desktop update.

Original WSL ~/.docker/config.json was

{
  "credsStore": "desktop.exe"
}

Must be manually replaced now by

{
  "credsStore": "wincred.exe"
}

To allow both access to public non authenticated and authenticated repositories.

Do not mistake with the same file you should also have in C:\Users\<user>\.docker when using docker on Windows host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.