You also have to
- Explicitely enable loopback mode for pinentry in your gpg-agent.conf.
- Configure epa to use loopback for pinentry.
- Start the pinentry server in emacs,
1. Enable Emacs pinentry and loopback mode for gpg-agent
Put this in your ~/.gnupg/gpg-agent.conf:
allow-emacs-pinentry allow-loopback-pinentry Then tell gpg-agent to load this configuration with gpgconf in a shell:
gpgconf --reload gpg-agent 2. Configure EasyPG Assistant to use loopback for pinentry
In emacs, either do
M-x customize-group RET epa RET Then set “Epa Pinentry Mode” to ‘loopback’ and apply.
Or put this in your ~/.emacs file:
(setq epa-pinentry-mode 'loopback) 3. Start the pinentry server in Emacs.
Note: epa-pinentry-mode is deprecated since 27.1, either do
M-x customize-group RET epg RET InThen set “Epg Pinentry Mode” to ‘loopback’ and apply.
Or put this in your ~/.emacs file:
(setq epg-pinentry-mode 'loopback) Finally, in Emacs, do
M-x pinentry-start RET This starts the server for the current session. To start it in each new Emacs instance, put this into your .emacs:
(pinentry-start)