docker-credential-helpers icon indicating copy to clipboard operation
docker-credential-helpers copied to clipboard

"docker-credential-pass": executable file not found in $PATH

Open iainfogg opened this issue 4 years ago • 4 comments

Apologies, this may be the wrong place for this, I'm just not sure where to start as it could be an issue with the credential helper, Docker, the snap or the Ubuntu setup.

I'm running Ubuntu 18.04 with Docker installed via snap, Docker is version 19.03.11.

I'm trying to get docker login to work with pass. pass works fine with my physical key on its own.

My Docker config file in ~/snap/docker/current/.docker/config.json looks like this:

{
        "credsStore": "pass",
	"HttpHeaders": {
		"User-Agent": "Docker-Client/19.03.8 (linux)"
	}
}

I've installed docker-credential-pass in /usr/bin and it's version 0.6.3.

However, when I run docker login, after entering my credentials, I always get this error:

Error saving credentials: error storing credentials - err: exec: "docker-credential-pass": executable file not found in $PATH, out: ``

docker-credential-pass is in the path, and is found if I run the command directly and if I type which docker-credential-pass. I've even tried putting it in a folder within my home folder which is in the path, in case that helps (I know Docker snap has some restrictions about where on the file system it can access). However, I'm still left with docker login failing to find docker-credential-pass.

Any ideas?

iainfogg avatar Jun 11 '20 12:06 iainfogg

Same here with upstream debian buster package. docker-credential-pass extracted to ~/.local/bin

$ which docker-credential-pass
~/.local/bin/docker-credential-pass

My ~/.docker/config.json:

{
  "credsStore": "pass"
}
$ docker login registry.example.com
Error saving credentials: error storing credentials - err: exit status 1, out: `pass not initialized: exec: "pass": executable file not found in $PATH:`

Also tried:

{
  "credsStore": "docker-credential-pass"
}
$ docker login registry.example.com
Error saving credentials: error storing credentials - err: exec: "docker-credential-docker-credential-pass": executable file not found in $PATH, out: ``

:neutral_face:

ju1ius avatar Jun 16 '20 21:06 ju1ius

(I know Docker snap has some restrictions about where on the file system it can access)

Looks like you was right. I just moved docker-credential-pass to /usr/local/bin and it's work.

sourceseek avatar Sep 01 '20 10:09 sourceseek

(I know Docker snap has some restrictions about where on the file system it can access)

Looks like you was right. I just moved docker-credential-pass to /usr/local/bin and it's work.

What does this mean for us that don't use docker-credential-pass?

I mean, what is the workaround when

{
  "credsStore": "pass"
}

yields

https://index.docker.io/v1/: error erasing credentials - err: exec: "docker-credential-pass": executable file not found in $PATH, out: ``

birgersp avatar Aug 29 '22 09:08 birgersp

cd /home/youruser
mv .docker .docker-old 

or you can remove it. try again

docker login

hiage avatar Sep 10 '22 13:09 hiage

looks like this was resolved

thaJeztah avatar May 28 '23 15:05 thaJeztah

When using this "solution", I still get the warning: WARNING! Your password will be stored unencrypted in /home/myusername/.docker/config.json.

So this is not resolved

laudrup87 avatar Jan 12 '24 07:01 laudrup87

# Install "pass" for Linux https://www.passwordstore.org/
sudo apt install pass
# Generate a pub/secret key
gpg --full-generate-key
# Init the pass store
pass init "<KEYID_GENERATED_BY_GPG>"

docker login

lucaspottersky avatar Jan 18 '24 17:01 lucaspottersky