FS#29156 - gpg-agent does not prompt for passphrase with pinentry-curses

Attached to Project: Arch Linux
Opened by Xyne (Xyne) - Wednesday, 28 March 2012, 20:21 GMT
Last edited by Gaetan Bisson (vesath) - Wednesday, 28 March 2012, 23:38 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

To reproduce:

eval $(gpg-agent --daemon --pinentry-program /usr/bin/pinentry-curses)
gpg -sb /some/file

Output:
You need a passphrase to unlock the secret key for
# key data here

gpg: cancelled by user
gpg: no default secret key: Operation cancelled
gpg: signing failed: Operation cancelled

No prompt ever appears. I've tried with and without exporting GPG_TTY=$(tty). I've also tried setting the pinentry app in the gpg-agent configuration file: I get the same output as above.

Without working pinentry-curses support there seems to be no way to use gpg without a GUI environment. (gpg --passphrase-fd 0 waits for input, but the input is ignored and the GUI prompt still pops up)

This task depends upon

Closed by  Gaetan Bisson (vesath)
Wednesday, 28 March 2012, 23:38 GMT
Reason for closing:  Upstream
Comment by Allan McRae (Allan) - Wednesday, 28 March 2012, 21:01 GMT
It works for me... I have "use-agent" in ~/.gnupg/gpg.conf and this is my ~/.gnupg/gpg-agent.conf:

pinentry-program /usr/bin/pinentry-curses
no-grab
default-cache-ttl 1800
Comment by Daniel Wallace (gtmanfred) - Wednesday, 28 March 2012, 21:15 GMT
Allan's settings work for me as well, also works when I symlinked /usr/bin/pinentry-curses to /usr/bin/pinentry
Comment by Xyne (Xyne) - Wednesday, 28 March 2012, 22:09 GMT
I've isolated the problem to "su".

I use different accounts to manage ssh, gpg, email and other things. I su into them as needed (to run mail clients, sign files, etc). With the previous gpg package this was never a problem. With the new one, it works with pinentry-gtk-2 and gpg-agent but not pinentry-curses. All configuration files are in the target user's ~/.gnupg dir and I've checked that the correct files are read.


Is that an upstream bug or am I missing something?
Comment by Xyne (Xyne) - Wednesday, 28 March 2012, 22:15 GMT
I'm searching for solutions right now. Seems to be a tty ownership problem. You can probably close this ticket.
Comment by Xyne (Xyne) - Wednesday, 28 March 2012, 22:17 GMT

Loading...