Fixing "err: docker-credential-desktop resolves to executable in current directory"

Attempting with a fresh install of Docker to docker-compose up --build a project but getting the error: error getting credentials - err: docker-credential-desktop resolves to executable in current directory (./docker-credential-desktop), out:

Docker compose is installed:

% docker-compose --version
Docker Compose version v2.18.1

I’ve seen various things around the net about the json config being incorrectly formatted, e.g. credsStore vs credStore:

        "credsStore": "Desktop",
        "auths": {},
        "credHelpers": {
                "": "desktop"
        "currentContext": "desktop-linux"

Modifying that line, or removing it entirely makes no difference.

I have also seen recommendations to make sure I’m signed into desktop. I am signed in, and the account is verified.

Any ideas?

Mac v11.6.1
Docker Desktop v4.20.1
Docker Compose v2.18.1

Got bitten by the same error message after having deinstalled a botched default Docker Desktop installation due to Docker never having heard of spaces in Windows paths and reinstalling. Afterwards, your dreaded error. In my case, a swift rm -rf ~/.docker cured the situation and I was then able to use “docker compose” without errors.

1 Like

Thanks @halb0 this fixed it for me :slight_smile: