Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-credential-desktop not installed or not available in PATH

I might have a bit of a messed Docker installation on my Mac.. At first I installed Docker desktop but then running it I learned that as I'm on an older Mac I had to install VirtualBox so I did following these steps:

  1. enable writing on the /usr/local/bin folder for user

    sudo chown -R $(whoami) /usr/local/bin

  2. install Docker-Machine

base=https://github.com/docker/machine/releases/download/v0.16.0 &&
  curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine &&
  chmod +x /usr/local/bin/docker-machine
  1. install Xcode CLI..manually from dev account

  2. Install Home Brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Docker + wget ( Using Brew)

    brew install docker

    brew install wget

  2. Install bash completion scripts

base=https://raw.githubusercontent.com/docker/machine/v0.16.0
for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash
do
    sudo wget "$base/contrib/completion/bash/${i}" -P /etc/bash_completion.d
done
  1. enable the docker-machine shell prompt

    echo 'PS1='[\u@\h \W$(__docker_machine_ps1)]\$ '' >> ~/.bashrc

  2. Install VirtualBox, ExtensionPack and SDK: https://www.virtualbox.org/wiki/Downloads

I now installed docker-compose (docker-compose version 1.29.2, build unknown) with home-brew but when running docker-compose up I get the following error:

docker.credentials.errors.InitializationError: docker-credential-desktop not installed or not available in PATH

which docker prints /usr/local/bin/docker.

Brew installations are in /usr/local/Cellar/docker/20.10.6 and /usr/local/Cellar/docker-compose/1.29.2. As I see there is also a home-brew for docker-machine should I install docker-machine via home-brew instead?

What can I check to make sure that I use the docker installations from home-brew and wipe/correct the installations made from steps above?

like image 568
Vincenzo Avatar asked May 21 '21 19:05

Vincenzo


People also ask

Where is Docker credential desktop?

When you log in, the command stores credentials in $HOME/. docker/config. json on Linux or %USERPROFILE%/. docker/config.

How do I reset Docker credentials?

If you ever change your Windows password, you'll want to head over to your Docker for Windows settings, shared drives, then click “Reset Credentials” under your shared drives.

Is there a docker Desktop for Linux?

Today we're excited to announce the general availability of Docker Desktop for Linux, providing developers that use Linux desktop environments the exact same Docker Desktop experience that's currently available on macOS and Windows.


3 Answers

Check your config.json and replace "credsStore" by "credStore"

{
  "stackOrchestrator" : "swarm",
  "experimental" : "disabled",
  "credStore" : "desktop"
}

like image 74
sixrandanes Avatar answered Nov 22 '22 14:11

sixrandanes


just in ~/.docker/config.json change credsStore to credStore

like image 21
Ivan Avatar answered Nov 22 '22 14:11

Ivan


After a long googling I found out that the problem is with the config.json file. The "credsStore" : "docker-credential-desktop" is wrong one in :

{
  "credsStore" : "docker-credential-desktop",
  "stackOrchestrator" : "swarm",
  "experimental" : "disabled"
} 

changed the "credsStore" key value to "desktop" and compose now works as expected. Some pointed out that credsDstore typo was the problem and fixed it with credDstore, but in my case the value was the problem, it works both with "credsStore" : "desktop" and "credStore" : "desktop".

Hope it'll help others starting out with Docker. Cheers.

like image 32
Vincenzo Avatar answered Nov 22 '22 12:11

Vincenzo