3 msgpersonal-*-preferences
1 msgQueries...
1 msgKey Comment/Email Address Length
1 msg[Announce] GnuPG 2.0.7 released
2 msgOT // signature verification
6 msgOT
12 msglosing meaningful whitespaces in an encrypted file
15 msgRSA or DSA? That's the question
2 msggpg: failed to create temporary file
3 msgold question: invalid trustdb (workarounds on t...
1 msgproblems signing keys
2 msgKey Signing, Subkeys
10 msgHow to use GnuPG to generate sha512sum hash?
2 msgproblem in Outlook 2003
2 msggpg: Option '--passphrase' is ambiguous

pinentry-curses and gpg-agent ipc write error
\ Adam Richards (28 Aug 2007)
. \ Werner Koch (28 Aug 2007)
. . \ Adam Richards (28 Aug 2007)
. . . \ Adam Richards (30 Aug 2007)
. . . . \ Adam Richards (23 Sep 2007)

5 msgHow to have 2 seperate keyrings on a server
2 msgOpenPGPCar on JavaCard key import and large keys
6 msgDifference gpg1 and gpg2 with OpenPGP smartcard
2 msgScott Seidl/Schneider is out of the office.
Subject:pinentry-curses and gpg-agent ipc write error
Group:Gnupg-users
From:Adam Richards
Date:28 Aug 2007


 
Hi.

I'm trying to get pinentry-curses (0.7.2_6) to work with gpg and
gpg-agent (v2.0.4). Both installed via /usr/ports on
FreeBSD-RELEASE, default Makefile options. But it is not
working.

When I enter my passphrase in the pinentry-curses dialog, the
response is:


----------------------------------------------------------------
gpg: problem with the agent: IPC write error
gpg: Invalid passphrase; please try again ...

You need a passphrase to unlock the secret key for
user: "<adam>"
4096-bit ELG key, ID AEXXXXXX, created 2005-11-25 (main key ID
0BA2643B)

gpg: problem with the agent: IPC write error
gpg: encrypted with 4096-bit ELG key, ID AEXXXXXX, created
2005-11-25
"<adam>"
gpg: public key decryption failed: General error
gpg: decryption failed: No secret key
----------------------------------------------------------------


Pinentry is indeed linked to pinentry-curses, my
~/.gnupg/gpg-agent.conf is setup correctly, and I'm using
`use-agent' directive in ~/.gnupg/gpg.conf:


----------------------------------------------------------------
~> pwd
/usr/local/bin
~> ll pinentry
[...] pinentry@ -> pinentry-curses

~> cat ~/.gnupg/gpg-agent.conf
default-cache-ttl 3600
pinentry-program /usr/local/bin/pinentry
debug-level guru
debug-all

~> grep use-agent ~/.gnupg/gpg.conf
use-agent
----------------------------------------------------------------


I know I have the correct passphrase because when I use a
different pinentry, it works just fine:


----------------------------------------------------------------
~> pwd
/usr/local/bin

~> ll pinentry
[...] pinentry@ -> pinentry-gtk

~> gpg -v sample.txt.gpg
[... gtk dialog comes up and I enter passphrase, hit OK ...]
gpg: public key is AEXXXXXX
gpg: using subkey AEXXXXXX instead of primary key 0BA2643B

You need a passphrase to unlock the secret key for
user: "<adam>"
gpg: using subkey AEXXXXXX instead of primary key 0BA2643B
4096-bit ELG key, ID AEXXXXXX, created 2005-11-25 (main key ID
0BA2643B)

gpg: encrypted with 4096-bit ELG key, ID AEXXXXXX, created
2005-11-25
"<adam>"
gpg: AES256 encrypted data
gpg: original file name='sample.txt'
----------------------------------------------------------------


And yes, I do remember to kill -HUP gpg-agent when needed.

I initiate gpg-agent from my ~/.zshrc:


----------------------------------------------------------------
[...]
# {{{ gpg-agent automation
if [[ -f $HOME/.gpg-agent-info ]] &&
kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null;
then
echo 'GPG-AGENT CURRENTLY RUNNING, UPDATING ENV...'
GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info`
export GPG_AGENT_INFO
echo 'GPG-AGENT ENV REFRESHED.'
else
echo '...STARTING GPG-AGENT'
eval `/usr/local/bin/gpg-agent --daemon`
echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
echo 'GPG-AGENT READY.'
fi
# }}}
[...]

~> /bin/ps x | grep gpg-agent
89498 ?? Ss 0:00.36 /usr/local/bin/gpg-agent --daemon

~> sockstat | grep gpg-agent
adam gpg-agent 89498 6 stream /tmp/gpg-GqplAN/S.gpg-agent
----------------------------------------------------------------


And I believe my ENV is correct:


----------------------------------------------------------------
~> cat /tmp/gpg-GqplAN/S.gpg-agent
OK Pleased to meet you

~> env | grep GPG
GPG_AGENT_INFO=/tmp/gpg-GqplAN/S.gpg-agent:89498:1
GPG_TTY=/dev/ttypm

~> tty
/dev/ttypm
----------------------------------------------------------------


Any help would be greatly appreciated. :) I haven't had much
luck googling around. I do not want to use a graphical-based
pinentry because I'm running xterm only over ssh session and I'm
not interested in X forwarding.

Thanks!

--
Adam Richards
e:adam | k:0x0BA2643B

_______________________________________________
Gnupg-users mailing list
Gnupg-users
http://lists.gnupg.org/mailman/listinfo/gnupg-users


© 2004-2008 readlist.com