Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
iainfogg opened this issue Jun 11, 2020 · 7 comments
Closed

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

iainfogg opened this issue Jun 11, 2020 · 7 comments

Comments

@iainfogg
Copy link

iainfogg commented Jun 11, 2020

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?

@ju1ius
Copy link

ju1ius commented Jun 16, 2020

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: ``

😐

@sourceseek
Copy link

(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.

@birgersp
Copy link

birgersp commented Aug 29, 2022

(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: ``

@hiage
Copy link

hiage commented Sep 10, 2022

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

or you can remove it.
try again

docker login

@thaJeztah
Copy link
Member

looks like this was resolved

@laudrup87
Copy link

laudrup87 commented Jan 12, 2024

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

@lucaspottersky
Copy link

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants