Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] can't gpg sign with repoman, but can with git
Date: Thu, 20 Jul 2017 05:50:12
Message-Id: 20170720084941.52a0a9f4da604dd2de65fe74@gentoo.org
In Reply to: Re: [gentoo-dev] can't gpg sign with repoman, but can with git by Mart Raudsepp
1 On Thu, 20 Jul 2017 00:44:12 +0300 Mart Raudsepp wrote:
2 > Ühel kenal päeval, K, 19.07.2017 kell 15:57, kirjutas Joshua Kinard:
3 > > On 07/19/2017 15:43, Andrew Savchenko wrote:
4 > > > On Wed, 19 Jul 2017 21:24:49 +0200 Paweł Hajdan, Jr. wrote:
5 > > > > Hey folks,
6 > > > >
7 > > > > This is mysterious, and likely some issue with my setup, although
8 > > > > it
9 > > > > used to work.
10 > > > >
11 > > > > Trying tocommit with repoman commit (app-portage/repoman version
12 > > > > 2.3.1)
13 > > > > results in the following:
14 > > > >
15 > > > > * 4 files being committed...
16 > > > > error: gpg failed to sign the data
17 > > > > fatal: failed to write commit object
18 > > > > !!! Exiting on git (shell) error code: 128
19 > > > >
20 > >
21 > > [snip]
22 > > >
23 > >
24 > > [snip]
25 > >
26 > > > Make sure that GPG_TTY is set in your shell.
27 > >
28 > > ^^^--- This is likely the issue.
29 > >
30 > > Add:
31 > >     export GPG_TTY=`tty`
32 > >
33 > > To your ~/.bash_profile (or wherever you put your PORTAGE_GPG_KEY
34 > > value), and
35 > > that should solve the issue.  I got bit by this once, and spent a
36 > > while
37 > > convincing Google that I'm not a robot to get that answer.
38 >
39 > Sounds like a workaround, and yes, I know it's been suggested before,
40 > including to me.
41 > Some pinentry issues imho if GPG_TTY makes it work, at least it was
42 > when I hit that half a year ago with this suggested as a solution. It's
43 > not a solution, it's a workaround, as users need to do something.
44 >
45 > FWIW, I don't have GPG_TTY set at all and things work fine, but I'm on
46 > pinentry-gnome3
47 > I think pinentry-curses and pinentry-tty might have had such trouble
48 > that need GPG_TTY stuff.
49
50 man gpg-agent says:
51
52 You should always add the following lines to your .bashrc or
53 whatever initialization file is used for all shell invocations:
54
55 GPG_TTY=$(tty)
56 export GPG_TTY
57
58 Thus there is no need to speculate if this is a workaround or if
59 one needs to convince Google they is not a robot. Just read the
60 official manual :)
61
62 Best regards,
63 Andrew Savchenko

Replies

Subject Author
Re: [gentoo-dev] can't gpg sign with repoman, but can with git Kristian Fiskerstrand <k_f@g.o>