1 |
On Wed, Feb 24, 2010 at 10:51:38PM +0000, Mick wrote: |
2 |
> eval "$(gpg-agent --daemon --no-detach --debug-level guru --log-file gpg- |
3 |
> agent.log)" |
4 |
> gpg-agent[7276]: enabled debug flags: command mpi crypto memory cache memstat |
5 |
> hashing assuan |
6 |
> |
7 |
> The log file shows: |
8 |
> ================================================ |
9 |
> 2010-02-24 20:32:01 gpg-agent[7276] listening on socket `/tmp/gpg- |
10 |
> IX4A40/S.gpg-agent' |
11 |
> 2010-02-24 20:32:01 gpg-agent[7277] gpg-agent (GnuPG) 2.0.14 started |
12 |
> 2010-02-24 20:32:13 gpg-agent[7277] SIGINT received - immediate shutdown |
13 |
> 2010-02-24 20:32:13 gpg-agent[7277] gpg-agent (GnuPG) 2.0.14 stopped |
14 |
> 2010-02-24 20:32:13 gpg-agent[7277] random usage: poolsize=600 mixed=0 |
15 |
> polls=0/0 added=0/0 |
16 |
> outmix=0 getlvl1=0/0 getlvl2=0/0 |
17 |
> 2010-02-24 20:32:13 gpg-agent[7277] secmem usage: 0/32768 bytes in 0 blocks |
18 |
> ================================================ |
19 |
> |
20 |
> However, when I invoke gpg it looks for another socket ... different to the |
21 |
> one that the agent is listening on. |
22 |
> ================================================ |
23 |
> $ gpg -vv DATA/some_data.ods.gpg |
24 |
> gpg: using character set `iso-8859-1' |
25 |
> gpg: enabled debug flags: memstat |
26 |
> :pubkey enc packet: version 3, algo 16, keyid <ZZZZZZZZZZZ> |
27 |
> data: [2048 bits] |
28 |
> data: [2045 bits] |
29 |
> gpg: public key is XXXXXXXX |
30 |
> gpg: using subkey XXXXXXXX instead of primary key YYYYYYYY |
31 |
> |
32 |
> You need a passphrase to unlock the secret key for |
33 |
> user: "me <me@×××××.com>" |
34 |
> gpg: using subkey XXXXXXXX instead of primary key YYYYYYYY |
35 |
> 2048-bit ELG key, ID XXXXXXXX, created 2010-01-25 (main key ID YYYYYYYY) |
36 |
> |
37 |
> can't connect to `/tmp/gpg-pNLb9Y/S.gpg-agent': No such file or directory |
38 |
> gpg: can't connect to the agent - trying fall back |
39 |
<snip> |
40 |
> ================================================ |
41 |
> |
42 |
> Why is this? Invoking gpg to decrypt different (encrypted) files always |
43 |
> brings up that socket '/tmp/gpg-pNLb9Y/S.gpg-agent'. Shouldn't it be a |
44 |
> different socket each time? |
45 |
|
46 |
Ack, let's do this one step at a time then. First let's try to figure |
47 |
out the problem with the gpg-agent. |
48 |
|
49 |
This time, run the command from gpg-agent, not inside a eval |
50 |
statement. Just by itself on the commandline. |
51 |
|
52 |
It should spit out the environmental variable GPG_AGENT_INFO. |
53 |
Copy the content of that variable (so copy the whole thing |
54 |
GPG_AGENT_INFO="......." ) |
55 |
In a new prompt, first paste the variable, then type gpg -vv *file* |
56 |
|
57 |
So it should be |
58 |
|
59 |
GPG_AGENT_INFO="......" gpg -vv DATA/filename.ogg |
60 |
|
61 |
Quick explanation: gpg finds out where the agent is by looking at the |
62 |
environmental variable GPG_AGENT_INFO. We want to try to make sure it |
63 |
is in fact looking at that variable. Take a look at the man pages for |
64 |
gpg-agent and gpg for more information. |
65 |
|
66 |
Now look at the output again to see if it is still connecting to the |
67 |
"wrong" socket. |
68 |
|
69 |
W |
70 |
-- |
71 |
Willie W. Wong wwong@××××××××××××××.edu |
72 |
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire |
73 |
et vice versa ~~~ I. Newton |