Hi, On 10/08/15 21:02, Daniel Campbell (zlg) wrote: > On 08/10/2015 06:15 AM, Doug Goldstein wrote: >> On Mon, Aug 10, 2015 at 3:36 AM, Chí-Thanh Christopher Nguyễn >> <[email protected]> wrote: >>> Doug Goldstein schrieb: >>>> gpg: cancelled by user gpg: skipped "0xA2BC03DC87ED1BD4": >>>> Operation cancelled gpg: signing failed: Operation cancelled >>>> error: gpg failed to sign the data >>> >>> There was an IRC discussion yesterday about this. Probably your >>> pinentry tries to talk to a GUI and fails. Try: >>> >>> unset DISPLAY export GPG_TTY=$(tty) >>> >>> to make it fall back to curses, or use "eselect pinentry" to >>> select curses as default. >>> >>> Interestingly, git requires GPG_TTY if eselect-pinentry is set to >>> gtk-2 or qt4, but repoman doesn't. >>> >>> >>> Best regards, Chí-Thanh Christopher Nguyễn >>> >>> > >> $ eselect pinentry show Current pinentry binary implementation: >> pinentry-curses > >> $ eselect pinentry list Available pinentry binary implementations: >> [1] pinentry-curses * > >> Its the only version I've got on this machine. The box is headless >> and I ssh into and I use keychain to manage my SSH and GPG agent. > > What's your keychain line look like in your .bashrc/.bash_profile? > Here's the relevant portion of mine. I was also having problems with > it until I changed the order of the arguments: > > [snip] > /usr/bin/keychain --agents ssh,gpg ~/.ssh/id_rsa ${GPGKEY} > source ~/.keychain/sporkbox-sh > /dev/null > source ~/.keychain/sporkbox-sh-gpg > /dev/null > [snip]
I have it exactly like you but I can reproduce the problem as follows. - I ssh into a long running byobu session on the machine. - I have pinentry-curses eselected 1) Spawn a new shell, keychain runs, pinentry-curses asks for the passphrases that are not cached yet, and everything is fine (in all running shells!). 2) Log off and return only after the passphrase timeout of the agent 3) The problem described in this thread appears, pinentry-curses won't start, both $DISPLAY and $tty are empty. 4) To fix, I just need to run any process that is able to start pinentry-curses and type the passphrase. Keychain is one option for that. git --signed is not. The only thing that is diffent from your setup is that I use zsh. Looking at the scripts created by keychain this should be fine, though. If somebody knows how to configure pinentry curses correctly (in particular with respect to screen/multiplexing and long running sessions, that would be a great help (and wiki addition). Cheers, Thomas -- Thomas Kahle http://dev.gentoo.org/~tomka/
signature.asc
Description: OpenPGP digital signature
