[pkg-gnupg-maint] Bug#568375: gnupg-agent: does not work with `git tag -s`

Michal Hocko mstsxfx at gmail.com
Thu Jan 12 11:19:47 UTC 2017


On Thu, Jan 12, 2017 at 11:59:34AM +0100, Michal Hocko wrote:
> On Sun, Mar 20, 2016 at 12:12:00AM -0400, Peter Colberg wrote:
> > Hi Luca,
> > 
> > On Thu, Feb 04, 2010 at 12:32:21PM +0100, Luca Capello wrote:
> > > Package: gnupg-agent
> > > Version: 2.0.14-1
> > > Severity: important
> > > 
> > > Hi there!
> > > 
> > > It seems that `git tag -s` and gpg-agent fails to cooperate and do not
> > > show the pinentry dialog (in my case the -curses variant inside screen):
> > > =====
> > > luca at gismo:~/Lab/thesis/text(git)[master]$ \
> > >  git tag -s -u E397832F -m "submitted" submitted $COMMIT
> > > 
> > > You need a passphrase to unlock the secret key for
> > > user: "Luca Capello <luca at pca.it>"
> > > 4096-bit RSA key, ID 3BE9F36D, created 2009-07-01 (main key ID E397832F)
> > > 
> > > gpg: cancelled by user
> > > gpg: skipped "E397832F": bad passphrase
> > > gpg: signing failed: bad passphrase
> > > error: gpg failed to sign the tag
> > > error: unable to sign the tag
> > 
> > While this comes too late for signing the tag of your submitted thesis
> > (congratulations!), this is likely caused by a missing GPG_TTY variable.
> > 
> > https://www.gnupg.org/documentation/manuals/gnupg/Common-Problems.html
> > 
> > The gpg-agent man page nowadays includes the following hint:
> > 
> >   It is important to set the GPG_TTY environment variable in your login
> >   shell, for example in the ‘~/.bashrc’ init script:
> > 
> >   export GPG_TTY=$(tty)
> 
> So I've tried this and it didn't help.
> $ export GPG_TTY=$(tty)
> $ git tag -s -u $ID ...
> 
> I get the password dialog but nothing really happens after then.
> 
> 16699 pts/1    S+     0:00         git tag -s -u B310E347
> 16700 pts/1    SL+    0:00           gpg --status-fd=2 -bsau B310E347
> 
> gpg is stuck waiting for an input
> $ strace -p 16700
> strace: Process 16700 attached
> read(4,
> 
> $ ll /proc/16700/fd/4 
> lrwx------ 1 miso miso 64 Jan 12 11:54 /proc/16700/fd/4 -> socket:[2711665]
> 
> but it never gets anything while gpg-agent is hogging the cpu
> 16703 ?        Ssl    3:05 gpg-agent --homedir /home/miso/.gnupg --use-standard-socket --daemon

Btw. gnupgp-agen 2.0.26-6+deb8u1 and gpnupg 1.4.18-7+deb8u3 versions
seem to be working just fine.

-- 
Michal Hocko



More information about the pkg-gnupg-maint mailing list