all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Matthew Carter <m@ahungry.com>
To: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Using epg with gpg-agent
Date: Mon, 18 Jun 2018 00:18:52 -0400	[thread overview]
Message-ID: <878t7c9177.fsf@ahungry.com> (raw)
In-Reply-To: <E1fUg1o-0003dl-Px@fencepost.gnu.org> (Richard Stallman's message of "Sun, 17 Jun 2018 18:20:08 -0400")

Richard Stallman <rms@gnu.org> 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 (m@ahungry.com)
http://ahungry.com



  reply	other threads:[~2018-06-18  4:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-17 22:20 Using epg with gpg-agent Richard Stallman
2018-06-18  4:18 ` Matthew Carter [this message]
2018-06-19  2:03 ` Filipp Gunbin
2018-06-19 22:57   ` Richard Stallman

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=878t7c9177.fsf@ahungry.com \
    --to=m@ahungry.com \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.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.
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.