help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Password prompt inside Emacs with epg-gpg-program -> "gpg2"?


From: Joakim Jalap
Subject: Re: Password prompt inside Emacs with epg-gpg-program -> "gpg2"?
Date: Mon, 08 Feb 2016 18:00:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Teemu Likonen <tlikonen@iki.fi> writes:
>
>> The present and the future of GPG (version 2.x and above) is to use
>> gpg-agent and pinentry. I think there's no way to escape that. And it's
>> better. But it seems that there are pinentry implementation(s) for
>> Emacs. There is one in GNU Elpa [...]
>
> Ok, thanks.  (BTW, part of the problem is that when I get the X popup,
> Emacs is in an unresponsive state.  And I need Emacs to get the
> password.  So I need to run a second Emacs instance, or get the password
> before calling Gnus.)
>
> I tried pinentry.el from Gnu Elpa.  What do I need to add exactly to
> "~/.gnupg/gpg-agent.conf"?  Just "allow-emacs-pinentry" as the package's
> doc tells doesn't work.
>
> I could figure it out myself I guess, but I decided to CC the author and
> hope we can improve the package's doc instead.

FWIW, this is what I have in my config regarding Gnupg:

**** GPG

     So, this was a bit of a pain to get working, but now it works. For some
     inexplicable reason, pinentry-emacs isn't built by default on
     either FreeBSD or Arch, so one has to build it from source, and add
     =--enable-pinentry-emacs=. Then add "allow-pinentry-emacs" to
     =~/.gnupg/gpg-agent.conf=.
     Then one simply does:
     #+BEGIN_SRC emacs-lisp
       (require 'pinentry)
       (pinentry-start)
       (setenv "INSIDE_EMACS" "YES")
     #+END_SRC

I also have the cache time set to some ridiculously high value so I
don't have to enter my password all the time, but I guess that's another story.

>
> Thanks,
>
> Michael.

Hope it helps :)

Joakim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]