On Wed, Feb 24, 2010 at 10:51:38PM +0000, Mick wrote: > eval "$(gpg-agent --daemon --no-detach --debug-level guru --log-file gpg- > agent.log)" > gpg-agent[7276]: enabled debug flags: command mpi crypto memory cache memstat > hashing assuan > > The log file shows: > ================================================ > 2010-02-24 20:32:01 gpg-agent[7276] listening on socket `/tmp/gpg- > IX4A40/S.gpg-agent' > 2010-02-24 20:32:01 gpg-agent[7277] gpg-agent (GnuPG) 2.0.14 started > 2010-02-24 20:32:13 gpg-agent[7277] SIGINT received - immediate shutdown > 2010-02-24 20:32:13 gpg-agent[7277] gpg-agent (GnuPG) 2.0.14 stopped > 2010-02-24 20:32:13 gpg-agent[7277] random usage: poolsize=600 mixed=0 > polls=0/0 added=0/0 > outmix=0 getlvl1=0/0 getlvl2=0/0 > 2010-02-24 20:32:13 gpg-agent[7277] secmem usage: 0/32768 bytes in 0 blocks > ================================================ > > However, when I invoke gpg it looks for another socket ... different to the > one that the agent is listening on. > ================================================ > $ gpg -vv DATA/some_data.ods.gpg > gpg: using character set `iso-8859-1' > gpg: enabled debug flags: memstat > :pubkey enc packet: version 3, algo 16, keyid <ZZZZZZZZZZZ> > data: [2048 bits] > data: [2045 bits] > gpg: public key is XXXXXXXX > gpg: using subkey XXXXXXXX instead of primary key YYYYYYYY > > You need a passphrase to unlock the secret key for > user: "me <[email protected]>" > gpg: using subkey XXXXXXXX instead of primary key YYYYYYYY > 2048-bit ELG key, ID XXXXXXXX, created 2010-01-25 (main key ID YYYYYYYY) > > can't connect to `/tmp/gpg-pNLb9Y/S.gpg-agent': No such file or directory > gpg: can't connect to the agent - trying fall back <snip> > ================================================ > > Why is this? Invoking gpg to decrypt different (encrypted) files always > brings up that socket '/tmp/gpg-pNLb9Y/S.gpg-agent'. Shouldn't it be a > different socket each time?
Ack, let's do this one step at a time then. First let's try to figure out the problem with the gpg-agent. This time, run the command from gpg-agent, not inside a eval statement. Just by itself on the commandline. It should spit out the environmental variable GPG_AGENT_INFO. Copy the content of that variable (so copy the whole thing GPG_AGENT_INFO="......." ) In a new prompt, first paste the variable, then type gpg -vv *file* So it should be GPG_AGENT_INFO="......" gpg -vv DATA/filename.ogg Quick explanation: gpg finds out where the agent is by looking at the environmental variable GPG_AGENT_INFO. We want to try to make sure it is in fact looking at that variable. Take a look at the man pages for gpg-agent and gpg for more information. Now look at the output again to see if it is still connecting to the "wrong" socket. W -- Willie W. Wong [email protected] Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire et vice versa ~~~ I. Newton

