Hi,
Since upgrading pinentry from 0.9.7 to 1.0.0, I've noticed some strangebehavior. In GNOME only, when gpg tries to access my secret key, theattempt fails without prompting me for my passphrase. For example, itfails like this:
Toggle snippet (10 lines)
[0] marusich@garuda:~$ echo hello > /tmp/message[0] marusich@garuda:~$ gpg --sign /tmp/message gpg: signing failed: Operation cancelledgpg: signing failed: Operation cancelled[2] marusich@garuda:~$
No prompt appears, GUI or otherwise. However, if I repeat the "gpg--sign" command many times, eventually a GUI does appear which asks mefor a password. In that case, everything works just fine. But about90-95% of the time, the attempt just fails like above, without showingme any prompt.
This problem is not limited to my manual command-line invocation. Thesame kind of issue also occurs when emacs (the graphical version,running in GNOME) tries to automatically decrypt encrypted files (e.g.,when gnus needs to read my ~/.authinfo.gpg file to connect to an emailserver). Normally, when emacs needs to decrypt a file like this, a newwindow pops up to ask me for my passphrase, but because of this issue,the decryption fails, without showing me a prompt, for a similar reason:
Toggle snippet (8 lines)
Error while decrypting with "gpg":
gpg: encrypted with 4096-bit RSA key, ID 0FE3DE4943560F06, created 2016-02-19 "Chris Marusich <cmmarusich@gmail.com>"gpg: public key decryption failed: Operation cancelledgpg: decryption failed: No secret key
I suspect these are symptoms of the same issue.
My ~/.gnupg/gpg-agent.conf contains the following single line:
pinentry-program /home/marusich/.guix-profile/bin/pinentry
This issue does NOT occur in Xfce. This issue does NOT occur when I runthe "gpg --sign" command in a virtual terminal (e.g., by pressingControl+Alt+F2 to switch to a virtual terminal). In GNOME, this issueDOES occur regardless of which "pinentry" program I specify in my~/.gnupg/gpg-agent.conf file (the same issue occurs with pinentry,pinentry-curses, pinentry-gtk-2, and pinentry-tty).
I've run both "guix pull" and "sudo guix pull" successfully in the lastfew days, and I've successfully reconfigured my system since then, soI'm using the most recent Guix software. I'm using GuixSD.
Since I've added and modified many things to my home directory, I triedcreating a test user with a fresh home directory to rule out my localcustomizations as a cause. I was able to reproduce the issue using afresh test user in GNOME after installing gnupg and pinentry via "guixpackage -i gnupg pinentry". The only changes I made to the test user'shome directory were (1) I added the "export" statements to its ~/.bashrcfile which were suggested by Guix after installing those two packages,and (2) I added a ~/.gnupg/gpg-agent.conf which uses the pinentry thatgot installed into the test user's profile. So, I expect that otherusers of GuixSD can probably reproduce this issue.
-- Chris