5

On a new install

Debian Stretch
GNU Emacs 24.5.1 
gpg (GnuPG) 2.1.18
libgcrypt 1.7.6-beta
pinentry-gnome3 (pinentry) 1.0.0

ls - /usr/bin/pinent*
/usr/bin/pinentry -> /etc/alternatives/pinentry
/usr/bin/pinentry-curses
/usr/bin/pinentry-gnome3
/usr/bin/pinentry-gtk-2
/usr/bin/pinentry-qt
/usr/bin/pinentry-qt4 -> pinentry-qt
/usr/bin/pinentry-tty
/usr/bin/pinentry-x11 -> /etc/alternatives/pinentry-x11

ls -1 /etc/alternatives/pinentry* 
/etc/alternatives/pinentry -> /usr/bin/pinentry-gnome3
/etc/alternatives/pinentry-x11 -> /usr/bin/pinentry-gnome3

with ~/.gnupg/gpg-agent.conf containing:

allow-emacs-pinentry

I'm still getting a popup dialog titled pinentry-gnome3 asking for the passphrase. When I changed pinentry symlink to point to the other varieties, analogous behaviour ensued.

What do I need to do to have the passphrase handled in the minibuffer?

======================================================================== EDIT 2017-05-02: After more research, it seems the current Debian distro is opposed to having Emacs handle the passphrase and the distro has gone to some effort to thwart it. So, my conclusion is that it is not possible without going outside the distro. In personal correspondence today, the distro remains opposed.

This wasn't always the case. I may boot back to a Wheezy installation (a point at which I know it was possible) to see if C-h l retrieves the passphrase.

Here are a few links. The most recent Debian discussion is about 3 months old:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854797

Here are some alternatives to EasyPG:

https://www.emacswiki.org/emacs/AutoEncryption

here are some other links with related info:

1
  • I'm not sure about Debian-style distros, but in RHEL-style, there's a program called something-askpass (I've removed it long ago). Try apt-cache search askpass, if something like gnome-askpass comes up, uninstall it. Desktop managers come with a graphic interface for reading passwords, and it's usually not the one you want to use, so uninstalling it would result in passwords read from command line.
    – wvxvw
    Commented May 3, 2017 at 5:03

1 Answer 1

6

Have you tried installing gpg version greater than 2.1, and then (setq epa-pinentry-mode 'loopback)? This should prompt for the password in the minibuffer.

Edit: epa-pinentry-mode has been marked obsolete from Emacs 27. Use epg-pinentry-mode instead.

1
  • 1
    This definitely works on my machine. Thanks a lot. Commented Jul 6, 2019 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.