all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Derk Ire <derkire@gmail.com>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: help-gnu-emacs@gnu.org
Subject: Re: emacs interface with gpg-agent stopped working (or stopped caching passphrase)
Date: Sat, 3 Sep 2016 11:50:38 -0700	[thread overview]
Message-ID: <CALeEP94Hht3QB2m6B1P59nko_4OODEQ+6bF=0AJQ-ivQPx+uQA@mail.gmail.com> (raw)
In-Reply-To: <87eg51c9xk.fsf@iki.fi>

Teemu,

Setting epg-gpg-program in ~/.emacs fixed the problem

;;in ~/.emacs

(setq epg-gpg-program "gpg2")

I also found that with the program versions listed in OP, I no longer
need to start gpg-agent in my .Xesession (or equivalent), nor do I
need to set any environment variables. Emacs will in fact start
gpg-agent when needed, and it automagically works, with
gnome-ssh-askpass popping up, and remembering the passphrase for a
while.

Thank much for your insight.

(3d time trying to post this reply, hope I got it right this time)


On Sat, Sep 3, 2016 at 7:52 AM, Teemu Likonen <tlikonen@iki.fi> wrote:

> derkire@gmail.com [2016-09-02 23:32:11-07] wrote:
>
> > Expected (old) behavior: When opening (find-file) files in emacs,
> > emacs contacts the gpg-agent, and a GUI window is popped to enter the
> > passphrase. This is then enough to decrypt ALL additional .gpg files
> > opened by emacs for the next 5 minutes.
> >
> > Actual (new) behavior: emacs instead asks for passphrase in the
> > minibuffer (not GUI popup!), and the file will decrypt, BUT the PP has
> > to be entered each time a new file is opened. That is, no more
> > 5min/300sec window of caching. I interpret this to mean that the
> > interface between emacs and the gpg-agent is not functioning
> > correctly.
>
> It looks to me that your Emacs is now using old GPG 1.4 and not GPG 2.x
> version. Emacs has some magic code to choose which one to use but the
> logic is unknown to me. There is also variable epg-gpg-program.
>
> GPG 1.4 will connect to agent if ~/.gnupg/gpg.conf file has this line:
>
>     use-agent
>
> GPG 2.x don't need that option because they always connect to the agent.
>
>
> --
> /// Teemu Likonen   - .-..   <https://github.com/tlikonen> //
> // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///
>


  parent reply	other threads:[~2016-09-03 18:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03  6:32 emacs interface with gpg-agent stopped working (or stopped caching passphrase) derkire
2016-09-03  6:40 ` derkire
2016-09-03  7:09   ` Eli Zaretskii
2016-09-03 14:52 ` Teemu Likonen
2016-09-03 15:04   ` Teemu Likonen
2016-09-03 18:50   ` Derk Ire [this message]
2016-09-03 19:24   ` Derk Ire
  -- strict thread matches above, loose matches on Subject: below --
2016-09-03 18:45 Reik Reid

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='CALeEP94Hht3QB2m6B1P59nko_4OODEQ+6bF=0AJQ-ivQPx+uQA@mail.gmail.com' \
    --to=derkire@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tlikonen@iki.fi \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.