Discussion:
[gentoo-user] gpg2 - error gpg: public key decryption failed: No pinentry
(too old to reply)
t***@sys-concept.com
2018-01-17 06:00:01 UTC
Permalink
When I try to decrypt a file I get:

gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key

app-crypt/pinentry-1.0.0-r2 is installed

I've tried to kill "gpg-agent" didn't help.
--
Joseph
Alexander Ben Nasrallah
2018-01-17 06:50:01 UTC
Permalink
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.

# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2

to whatever suits you in ~/.gnupg/gpg-agent.conf.

Hope that helps.
Mick
2018-01-17 09:00:01 UTC
Permalink
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.
# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
to whatever suits you in ~/.gnupg/gpg-agent.conf.
Hope that helps.
Or, instead of the above it should have:

pinentry-program /usr/bin/pinentry

which is a symlink to the pinentry GUI used by the system. In any case this
file will be set up by /usr/bin/gpgconf, which is run when a GUI application
calls gnupg, rather than edited manually by the user.
--
Regards,
Mick
t***@sys-concept.com
2018-01-17 13:40:02 UTC
Permalink
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.
# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
to whatever suits you in ~/.gnupg/gpg-agent.conf.
Hope that helps.
In my ".gnupg/gpg-agent.conf" I have:

###+++--- GPGConf ---+++###
default-cache-ttl 600
max-cache-ttl 6000

Adding eg. "pinentry-program /usr/bin/pinentry-qt" to the above
configuration file doesn't help.

When I run:
pinentry-program /usr/bin/pinentry
-bash: pinentry-program: command not found

--
Joseph
t***@sys-concept.com
2018-01-17 14:00:02 UTC
Permalink
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.
# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
to whatever suits you in ~/.gnupg/gpg-agent.conf.
Hope that helps.
OK, "gpg2 text.asc" it works now at the computer terminal but when I
log-in over "ssh"
it still giving me same error.

gpg2 text.asc
...
gpg: public key decryption failed: End of file
gpg: decryption failed: No secret key

In my other boxes I don't have any entry in ~/.gnupg/gpg-agent.conf
and it works OK even over ssh.

Joseph
Mick
2018-01-17 14:30:01 UTC
Permalink
Post by t***@sys-concept.com
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.
# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
to whatever suits you in ~/.gnupg/gpg-agent.conf.
Hope that helps.
OK, "gpg2 text.asc" it works now at the computer terminal but when I
log-in over "ssh"
it still giving me same error.
Have you logged in as a user which has a key pair configured on the PC?
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: End of file
gpg: decryption failed: No secret key
This says you don't have a private key configured.
Post by t***@sys-concept.com
In my other boxes I don't have any entry in ~/.gnupg/gpg-agent.conf
and it works OK even over ssh.
Joseph
An entry like those suggested for pinentry would be required for *GUI*
applications to know which front end to use.
--
Regards,
Mick
t***@sys-concept.com
2018-01-17 14:40:02 UTC
Permalink
Post by Mick
Post by t***@sys-concept.com
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
Sometime you have to set one of the following.
# PIN entry program
pinentry-program /usr/bin/pinentry-curses # no X
pinentry-program /usr/bin/pinentry-qt
pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
to whatever suits you in ~/.gnupg/gpg-agent.conf.
Hope that helps.
OK, "gpg2 text.asc" it works now at the computer terminal but when I
log-in over "ssh"
it still giving me same error.
Have you logged in as a user which has a key pair configured on the PC?
I just copied 'scp' entire subfolder ".gnupg/" from one system to
another. It works when I click on the file at the computer but not over
ssh.
Alexander Ben Nasrallah
2018-01-17 20:40:01 UTC
Permalink
Post by t***@sys-concept.com
Post by Mick
Post by t***@sys-concept.com
OK, "gpg2 text.asc" it works now at the computer terminal but when I
log-in over "ssh"
it still giving me same error.
Have you logged in as a user which has a key pair configured on the PC?
I just copied 'scp' entire subfolder ".gnupg/" from one system to
another. It works when I click on the file at the computer but not over
ssh.
Have you tried pinentry-curses? I'm not sure if qt version works over
ssh.
Neil Bothwick
2018-01-17 21:00:02 UTC
Permalink
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
Post by Mick
Have you logged in as a user which has a key pair configured on the PC?
I just copied 'scp' entire subfolder ".gnupg/" from one system to
another. It works when I click on the file at the computer but not
over ssh.
Have you tried pinentry-curses? I'm not sure if qt version works over
ssh.
Or use ssh -Y to connect, and have X forwarding enabled on the server.
--
Neil Bothwick

Velilind's Laws of Experimentation:
1. If reproducibility may be a problem, conduct the test only once.
2. If a straight line fit is required, obtain only two data points.
t***@sys-concept.com
2018-01-17 21:20:02 UTC
Permalink
Post by Neil Bothwick
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
Post by Mick
Have you logged in as a user which has a key pair configured on the PC?
I just copied 'scp' entire subfolder ".gnupg/" from one system to
another. It works when I click on the file at the computer but not
over ssh.
Have you tried pinentry-curses? I'm not sure if qt version works over
ssh.
Or use ssh -Y to connect, and have X forwarding enabled on the server.
Yes, that what I do. I can run any graphical interface software just
fine, eg:
evince, meld, ooffice etc.

Joseph
t***@sys-concept.com
2018-01-17 21:10:02 UTC
Permalink
Post by Alexander Ben Nasrallah
Post by t***@sys-concept.com
Post by Mick
Post by t***@sys-concept.com
OK, "gpg2 text.asc" it works now at the computer terminal but when I
log-in over "ssh"
it still giving me same error.
Have you logged in as a user which has a key pair configured on the PC?
I just copied 'scp' entire subfolder ".gnupg/" from one system to
another. It works when I click on the file at the computer but not over
ssh.
Have you tried pinentry-curses? I'm not sure if qt version works over
ssh.
Yes, that works. It gives me:

pinentry-curses
OK Pleased to meet you

Joseph
Neil Bothwick
2018-01-17 09:50:01 UTC
Permalink
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
What does "eselect pinentry list" tell you?
--
Neil Bothwick

Windows - so intuitive you only need a meg of help files!
t***@sys-concept.com
2018-01-17 13:40:02 UTC
Permalink
Post by Neil Bothwick
Post by t***@sys-concept.com
gpg2 text.asc
...
gpg: public key decryption failed: No pinentry
gpg: decryption failed: No secret key
app-crypt/pinentry-1.0.0-r2 is installed
What does "eselect pinentry list" tell you?
eselect pinentry list
Available pinentry binary implementations:
[1] pinentry-qt *
[2] pinentry-gtk-2
[3] pinentry-qt4
[4] pinentry-curses
[5] pinentry-tty

Joseph
Neil Bothwick
2018-01-17 13:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Neil Bothwick
What does "eselect pinentry list" tell you?
eselect pinentry list
[1] pinentry-qt *
[2] pinentry-gtk-2
[3] pinentry-qt4
[4] pinentry-curses
[5] pinentry-tty
Is pinentry-qt installed and working?
--
Neil Bothwick

System halted - Press all keys at once to continue.
t***@sys-concept.com
2018-01-17 14:30:01 UTC
Permalink
Post by Neil Bothwick
Post by Neil Bothwick
Post by Neil Bothwick
What does "eselect pinentry list" tell you?
eselect pinentry list
[1] pinentry-qt *
[2] pinentry-gtk-2
[3] pinentry-qt4
[4] pinentry-curses
[5] pinentry-tty
Is pinentry-qt installed and working?
"eix pinentry-qt" is not showing any entry, no such program.
Neil Bothwick
2018-01-17 14:50:01 UTC
Permalink
Post by t***@sys-concept.com
Post by Neil Bothwick
Is pinentry-qt installed and working?
"eix pinentry-qt" is not showing any entry, no such program.
Try "which pinentry-qt", it's part of the pinentry package, controlled by
USE.
--
Neil Bothwick

Few women admit their age. Few men act theirs.
t***@sys-concept.com
2018-01-17 16:30:01 UTC
Permalink
Post by Neil Bothwick
Post by t***@sys-concept.com
Post by Neil Bothwick
Is pinentry-qt installed and working?
"eix pinentry-qt" is not showing any entry, no such program.
Try "which pinentry-qt", it's part of the pinentry package, controlled by
USE.
which pinentry-qt
/usr/bin/pinentry-qt

equery b pinentry-qt
* Searching for pinentry-qt ...
app-crypt/pinentry-1.0.0-r2 (/usr/bin/pinentry-qt)

I re-emerged pinentry but it makes no difference.

It might be some glitch with the new profile.
On the new system I'm using:

default/linux/amd64/17.0/desktop *

All my other system are using:
default/linux/amd64/13.0/desktop *

Joseph
t***@sys-concept.com
2018-01-19 03:50:01 UTC
Permalink
Post by Neil Bothwick
Post by Neil Bothwick
Post by Neil Bothwick
What does "eselect pinentry list" tell you?
eselect pinentry list
[1] pinentry-qt *
[2] pinentry-gtk-2
[3] pinentry-qt4
[4] pinentry-curses
[5] pinentry-tty
Is pinentry-qt installed and working?
Switching to to "pinentry-gtk-2" solved the problem.

Thank you all for your help.
Joseph

Loading...