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

Error saving credentials: error storing credentials - err: exit status 1, out: exit status 1: gpg: SMART : ignoré : Pas de clef publique gpg: [stdin]: encryption failed: Pas de clef publique Password encryption aborted. #199

Open
hadir-saadani opened this issue Apr 24, 2021 · 3 comments

Comments

@hadir-saadani
Copy link

j'ai un problème lorsque je veux connecté un hub docker: ~ $ sudo docker login -u hadirsd Password:

Erreur lors de l'enregistrement des informations d'identification: erreur lors de l'enregistrement des informations d'identification - err: état de sortie 1, sortie: exit status 1: gpg: SMART : ignoré : Pas de clef publique gpg: [stdin]: encryption failed: Pas de clef publique Password encryption aborted.

et je ne sais pas pourquoi il'y a quelqu'un à la solution pour ce problème et merci

@Wolvverine
Copy link

Wolvverine commented Jan 30, 2022

The same, v0.6.4

Error saving credentials: error storing credentials - err: exit status 1, out: ``exit status 1: gpg: sec: skipped: No public key gpg: [stdin]: encryption failed: No public key Password encryption aborted.``

script here:

https://github.com/Wolvverine/docker-glpi/blob/develop/docker_login.sh

On WSL, Debian Stable with:
export GPG_TTY=$(tty)

$ docker-credential-pass list
no usernames for https://index.docker.io/v1/

$ pass show
Password Store
└── docker-credential-helpers
└── xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

$ pass version
v1.7.3
$ docker-credential-pass version
0.6.4
$ gpg --version
gpg (GnuPG) 2.2.27

$ docker version
Client: Docker Engine - Community
Version: 20.10.12
API version: 1.41

On Travis, with Xenial all is ok , to docker push: Denied: requested access to the resource is denied.

https://app.travis-ci.com/github/Wolvverine/docker-glpi/jobs/557602393

"
Now that you're logged in, whenever you try to push an image you're probably going to get an denied: requested access to the resource is denied error. That's because docker is not able to use the password it has stored in the root's password store. If you're using root to push the image (bad idea anyway), you will need to export GPG_TTY=$(tty) so that docker can ask you for your password to unlock root's pass entry. If you're like me that uses a non-root user belonging to the docker group, not even that works, so you've spent all this time reading and trying to fix everything for nothing... Thank you Docker -"

https://lyz-code.github.io/blue-book/docker/#dont-store-credentials-in-plaintext

@Wolvverine
Copy link

Wolvverine commented Jan 30, 2022

And problem is resolved here:

key=$(gpg --no-auto-check-trustdb --list-secret-keys --with-colon | grep ^sec | cut -d: -f5 )
echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key "$key" trust
or
(echo trust &echo 5 &echo y &echo quit &echo save) | gpg  --batch --command-fd 0 --edit-key "$key"
or
printf "5\ny\n" | gpg --command-fd 0 --expert --edit-key "$key" trust

@Wolvverine
Copy link

Wolvverine commented Jan 30, 2022

For
"Denied: requested access to the resource is denied."
on Xenial and WSL Debian stable is one difference - username in secure store:

Xenial:
`
Password verification:
pass show docker-credential-helpers | sed -e 's/(.)/*/g'



`

WSL Debian:
Password verification: ************************* ***************************************************** ******************

And now on Focal (Travis environment) is Ok.

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

2 participants