emacs-devel
[Top][All Lists]
Advanced

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

Re: Using epg with gpg-agent


From: Matthew Carter
Subject: Re: Using epg with gpg-agent
Date: Mon, 18 Jun 2018 00:18:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Does anyone know how to make the Emacs encryption commands such as
> epa-decrypt-region work with gpg-agent on a text console?
> If I start gpg-agent in the usual way before running Emacs,
> then when I try to decrypt, gpg-agent and Emacs both try to
> read from the terminal so the passphrase always gets garbled.

I use a setup where all my Emacs based decryption (epa) commands are
from the (text/tty Emacs) password input prompt in Emacs, and sent to
gpg-agent.  This works for me over SSH, tty1-6, or in an X session
terminal emulator (no call out to the GUI password input prompt).

More recent versions of Emacs/gpg-agent required me to add the loopback
option, as well as the Emacs options - a couple years ago it worked with
just the allow-emacs-pinentry setting and nothing else:

My relevant settings are as follows:

In ~/.gnupg/gpg-agent.conf:

allow-emacs-pinentry
allow-loopback-pinentry

On the Emacs side:

(setq epa-pinentry-mode 'loopback)
(pinentry-start) ; This was disabled recently in Emacs 26+ and has to be
explicitly called

I know I ran into many garbled text issues when trying to combine
ncurses input on the gpg-agent with Emacs functions.

-- 
Matthew Carter (address@hidden)
http://ahungry.com



reply via email to

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