[Pkg-gnupg-maint] Bug#727013: Bug #727013: [gnupg2] gpg2 cannot connect to pinentry, although it is installed

Thomas Hackert thackert at nexgo.de
Tue Jan 6 15:35:25 UTC 2015

Hello Eric, *,
> Control: tags -1 unreproducible
> * Thomas Hackert (thackert at nexgo.de) wrote:
> > Package: gnupg2
> > Version: 2.0.20-1
> > Severity: normal
> > 
> > --- Please enter the report below this line. ---
> > Hello @ll,
> > when I create a test file via
> > <quote>
> > echo test > test
> > </quote>
> > and then use
> > <quote>
> > gpg2 --sign test
> > </quote>
> > to sign my test file, I get the following message
> > <quote>
> > You need a passphrase to unlock the secret key for
> > user: "Test User"
> > 2048-bit RSA key, ID $secret, created 2013-10-21
> > 
> > gpg: can't connect to the agent - trying fall back
> > gpg-agent[4199]: enabled debug flags: assuan
> > gpg: problem with the agent: No pinentry
> > gpg: no default secret key: Operation cancelled
> > gpg: signing failed: Operation cancelled
> > </quote>
> Odd. Could you try running your agent under strace to try to see where
> it's failing to find pinentry?

I have tried different things:
First on my netbook (an Asus eeepC 1000H with Debian Testing i686):
1. "killall gpg-agent" to kill the agent
2. "strace /usr/bin/gpg-agent --daemon --sh
/usr/bin/dbus-launch --exit-with-session x-session-manager 2&>
~/gnupg_strace.log" to restart the agent (or did you mean something
different here?)
3. switched to another tab in konsole and typed "gpg2 --sign test" (got
the same message as before)
4. switched back to the tab with the strace command
5. have waited for ca. 20 seconds, before an Xdialog window with "KDE is
already running" (or something like that) popped up
6. stopped strace with <CRTL>+<C>, after I confirmed this dialog

This resulted in an log file, which is 7.1 MB large. But as I am not a
dev, I cannot see, if my "gpg2 --sign..." leads to any error message,
sorry ... :(

The second try was done on the PC, which I use for my recreational
training with Debian Testing AMD64:
1. Moved my .gnupg directory to dotgnupg (though I have never used GPG
there ... ;) )
2. tried "gpg2 --gen-key"
3. entered all needed data like name, mail address, etc.
4. confirmed its correctness

There I got the message
You need a Passphrase to protect your secret key.

gpg: problem with the agent: No pinentry
gpg: Key generation canceled.
... :( I have installed – as with my eeePC – pinentry-qt4 as well as
pinentry-curses, where the last one is entered in my gpg-agent.conf.

Third try (back at home):
1. Restarted my netbook
2. Did the "gpg2 --sign test" again

Got the message
gpg: writing to `test.gpg'
gpg: signing failed: No pinentry
gpg: signing failed: No pinentry

Now I am at my wit's end ... :( If you know something easy to help you,
feel free to ask :)
Sorry for the inconvenience and have a nice afternoon

Everyone who comes in here wants three things:
	(1) They want it quick.
	(2) They want it good.
	(3) They want it cheap.
I tell 'em to pick two and call me back.
		-- sign on the back wall of a small printing company

More information about the Pkg-gnupg-maint mailing list