public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Willie Wong <wwong@Math.Princeton.EDU>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] gnupg fails to decrypt on kmail
Date: Wed, 24 Feb 2010 19:09:17 -0500	[thread overview]
Message-ID: <20100225000917.GA14660@math.princeton.edu> (raw)
In-Reply-To: <201002242251.40554.michaelkintzios@gmail.com>

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 <me@gmail.com>"
> 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                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



  reply	other threads:[~2010-02-25  1:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-21 14:50 [gentoo-user] gnupg fails to decrypt on kmail Mick
2010-02-21 15:08 ` Willie Wong
2010-02-21 15:32   ` Mick
2010-02-21 17:01     ` Willie Wong
2010-02-22  6:49       ` Mick
2010-02-24 11:31         ` Mick
2010-02-24 14:48           ` Willie Wong
2010-02-24 15:03           ` Willie Wong
2010-02-24 22:51             ` Mick
2010-02-25  0:09               ` Willie Wong [this message]
2010-02-25  7:01                 ` Mick
2010-02-25 11:18                   ` Willie Wong
2010-02-25 20:45                     ` Mick
2010-02-26  1:08                       ` Willie Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100225000917.GA14660@math.princeton.edu \
    --to=wwong@math.princeton.edu \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox