1 |
Hi, |
2 |
|
3 |
On 10/08/15 21:02, Daniel Campbell (zlg) wrote: |
4 |
> On 08/10/2015 06:15 AM, Doug Goldstein wrote: |
5 |
>> On Mon, Aug 10, 2015 at 3:36 AM, Chí-Thanh Christopher Nguyễn |
6 |
>> <chithanh@g.o> wrote: |
7 |
>>> Doug Goldstein schrieb: |
8 |
>>>> gpg: cancelled by user gpg: skipped "0xA2BC03DC87ED1BD4": |
9 |
>>>> Operation cancelled gpg: signing failed: Operation cancelled |
10 |
>>>> error: gpg failed to sign the data |
11 |
>>> |
12 |
>>> There was an IRC discussion yesterday about this. Probably your |
13 |
>>> pinentry tries to talk to a GUI and fails. Try: |
14 |
>>> |
15 |
>>> unset DISPLAY export GPG_TTY=$(tty) |
16 |
>>> |
17 |
>>> to make it fall back to curses, or use "eselect pinentry" to |
18 |
>>> select curses as default. |
19 |
>>> |
20 |
>>> Interestingly, git requires GPG_TTY if eselect-pinentry is set to |
21 |
>>> gtk-2 or qt4, but repoman doesn't. |
22 |
>>> |
23 |
>>> |
24 |
>>> Best regards, Chí-Thanh Christopher Nguyễn |
25 |
>>> |
26 |
>>> |
27 |
> |
28 |
>> $ eselect pinentry show Current pinentry binary implementation: |
29 |
>> pinentry-curses |
30 |
> |
31 |
>> $ eselect pinentry list Available pinentry binary implementations: |
32 |
>> [1] pinentry-curses * |
33 |
> |
34 |
>> Its the only version I've got on this machine. The box is headless |
35 |
>> and I ssh into and I use keychain to manage my SSH and GPG agent. |
36 |
> |
37 |
> What's your keychain line look like in your .bashrc/.bash_profile? |
38 |
> Here's the relevant portion of mine. I was also having problems with |
39 |
> it until I changed the order of the arguments: |
40 |
> |
41 |
> [snip] |
42 |
> /usr/bin/keychain --agents ssh,gpg ~/.ssh/id_rsa ${GPGKEY} |
43 |
> source ~/.keychain/sporkbox-sh > /dev/null |
44 |
> source ~/.keychain/sporkbox-sh-gpg > /dev/null |
45 |
> [snip] |
46 |
|
47 |
I have it exactly like you but I can reproduce the problem as |
48 |
follows. |
49 |
|
50 |
- I ssh into a long running byobu session on the machine. |
51 |
- I have pinentry-curses eselected |
52 |
|
53 |
1) Spawn a new shell, keychain runs, pinentry-curses asks for the |
54 |
passphrases that are not cached yet, and everything is fine (in |
55 |
all running shells!). |
56 |
|
57 |
2) Log off and return only after the passphrase timeout of the agent |
58 |
|
59 |
3) The problem described in this thread appears, pinentry-curses |
60 |
won't start, both $DISPLAY and $tty are empty. |
61 |
|
62 |
4) To fix, I just need to run any process that is able to start |
63 |
pinentry-curses and type the passphrase. Keychain is one option |
64 |
for that. git --signed is not. |
65 |
|
66 |
The only thing that is diffent from your setup is that I use zsh. |
67 |
Looking at the scripts created by keychain this should be fine, |
68 |
though. |
69 |
|
70 |
If somebody knows how to configure pinentry curses correctly (in |
71 |
particular with respect to screen/multiplexing and long running |
72 |
sessions, that would be a great help (and wiki addition). |
73 |
|
74 |
Cheers, |
75 |
Thomas |
76 |
|
77 |
|
78 |
|
79 |
-- |
80 |
Thomas Kahle |
81 |
http://dev.gentoo.org/~tomka/ |