docker-credential-helpers
docker-credential-helpers copied to clipboard
Error saving credentials: error storing credentials - err: exit status 1, out: `pass store is uninitialized`
I've successfully got it to install and work but the issue is it's not consistent.
Error:
- Error saving credentials: error storing credentials - err: exit status 1, out:
pass store is uninitialized
Expectation:
- Use the existing credentials
using
- https://github.com/docker/docker-credential-helpers/issues/102#issuecomment-388634452
- https://github.com/docker/docker-credential-helpers/issues/102#issuecomment-388974092
Troubleshooting:
gpg --list-keys /root/.gnupg/pubring.gpg '------------------------' pub 2048R/12312312 2019-03-23 uid Name [email protected] sub 2048R/23423423 2019-03-23
pass init 12312312 Password store initialized for 12312312
docker login username:
It shouldn't request the username and password it should just use the existing credentials. Why isn't it loading the key for 12312312
what's the fix?
Same here. Struggling with incomplete documentation.
The pass + GPG setup works fine.
gpg --list-keys
...
pub 2048R/02FDF8FE 2019-04-26
...
Init the pass
pass init 02FDF8FE
Password store initialized for 02FDF8FE.
$ cat ~/.password-store/.gpg-id
02FDF8FE
One can insert a password fine (this is a MANUAL confirmation of the init check, later I confirm that it is automatically created)
$ pass insert docker-credential-helpers/docker-pass-initialized-check
mkdir: created directory ‘/home/USER/.password-store/docker-credential-helpers’
Enter password for docker-credential-helpers/docker-pass-initialized-check:
Retype password for docker-credential-helpers/docker-pass-initialized-check:
$ pass ls
Password Store
└── docker-credential-helpers
└── docker-pass-initialized-check
$ pass insert docker-credential-pass/docker-pass-initialized-check
mkdir: created directory ‘/home/USER/.password-store/docker-credential-pass’
Enter password for docker-credential-pass/docker-pass-initialized-check:
Retype password for docker-credential-pass/docker-pass-initialized-check:
$ pass ls
Password Store
├── docker-credential-helpers
│ └── docker-pass-initialized-check
└── docker-credential-pass
└── docker-pass-initialized-check
Docker is configured to use pass:
$ grep creds ~/.docker/config.json
"credsStore": "pass",
as per https://docs.docker.com/engine/reference/commandline/login/#login-to-a-self-hosted-registry
Docker login succeeds, though fails to store the password:
$ docker login PERSONAL_REGISTRY
Username: gitlab+deploy-token-X
Password:
Error saving credentials: error storing credentials - err: exit status 1, out: `pass store is uninitialized`
I wish it would tell us WHICH PASS STORE is unit'd!?
But if we try to run it manually it hangs for a LONG TIME
$ ~/bin/docker-credential-pass
<<SLOW>>
Usage: /home/USER/bin/docker-credential-pass <store|get|erase|list|version>
<<FINALLY>
that was really slow to tell me ... how slow?
$ time ~/bin/docker-credential-pass list
pass store is uninitialized
real 1m0.347s
user 0m0.032s
sys 0m0.024s
Here's finally a reproduction of the error
$ ~/bin/docker-credential-pass list
<<SLOW>> (~1min)
pass store is uninitialized
Lies!
$ pass list
Password Store
└── docker-credential-helpers
└── docker-pass-initialized-check
$ pass show docker-credential-helpers/docker-pass-initialized-check
pass is initialized
Version is latest
$ ~/bin/docker-credential-pass version
0.6.0
Same here, followed all the steps but still:
λ pass show docker-credential-helpers/docker-pass-initialized-check
pass is initialized
λ docker-credential-pass list
pass store is uninitialized
λ jq '.credsStore' < ~/.docker/config.json
"pass"
Some more information: checked commits, and commit d6c1f13 changed initialization checking logic in such a way that adding that docker-pass-initialized-check
is no longer necessary (it just calls pass ls
). Don't know why it doesn't still work.
I was having the same issue. I tried the lastest version v0.6.3 and that worked.
upgrade to v0.6.3 works for me too
I fixed it with the following commands:
service docker stop
rm ~/.docker/config.json
service docker start
I had non-empty config.json. The error is counter-intuitive.
$ echo $CR_PAT | docker login ghcr.io -u Ap3lsin4k --password-stdin
Error saving credentials: error storing credentials - err: exit status 1, out: `error storing credentials - err: exit status 1, out: `pass not initialized: exit status 1: Error: password store is empty. Try "pass init".``
$ echo $CR_PAT | wc --chars
41
Answer from @ha2la works for me:
$ service docker stop
$ rm ~/.docker/config.json
$ echo $CR_PAT | docker login ghcr.io -u Ap3lsin4k --password-stdin
Login Succeeded
I try use answer @ha2la
And before many of this tred
But then i enter
docker login -u ...
and password
Terminal show me
Error saving credentials: error storing credentials - err: exit status 1, out:
pass store is uninitialized`
@ha2la Works fine after stopping and starting docker services and removing json file
@ha2la its working thanks service docker stop rm ~/.docker/config.json service docker start
I fixed it with the following commands:
service docker stop rm ~/.docker/config.json service docker start
It worked, thank you
I fixed it with the following commands:
service docker stop rm ~/.docker/config.json service docker start
This worked!
I fixed it with the following commands:
service docker stop rm ~/.docker/config.json service docker start
This definitely works, but it's just reverting to storing your password in plain text as the warning message notes:
WARNING! Your password will be stored unencrypted in /home/{your_name}/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Follow the doc, please.
Link: https://docs.docker.com/desktop/get-started/#credentials-management-for-linux-users
if you want a GPG key without a password, run gpg --batch --passphrase '' --quick-gen-key [email protected] default default
Run this command : sudo docker login
. And then input your token.
It worked for me.
@Cupcc, be aware that sudo docker login
uses /root/.docker/config.json
instead of ~/.docker/config.json
.