Emacs-pinentry is not working for me on emacs 28.0.50 and Ubuntu 20.04, and I wonder why. I follow these steps:
- In
/home/user, dogit clone https://github.com/ecraven/pinentry-emacs.git - Following the answer here, I put this in
~/.gnupg/gpg-agent.conf:
allow-emacs-pinentry allow-loopback-pinentry - Tell
gpg-agentto load this configuration withgpgconfin a shell:gpgconf --reload gpg-agent - In Emacs'
init.elI write:
(use-package pinentry :config (setq epa-pinentry-mode 'loopback) (pinentry-start)) - Following advice here, I also include in my emacs dotfiles:
(defun pinentry-emacs (desc prompt ok error) (let ((str (read-passwd (concat (replace-regexp-in-string "%22" "\"" (replace-regexp-in-string "%0A" "\n" desc)) prompt ": ")))) str)) The author of emacs-pinentry also says to set GPG_AGENT_INFO correctly inside Emacs, but I don't know what that means.
Maybe that's the missing bit for my setup to work. Thought I think to remember that on one or two occassions I did enter successfully the password for decrypting some entry in .password-store with pass. But on those occassions I entered the password blindly, without any prompt or feedback on the minibuffer. I kinda tried my luck and it worked. However, my expectation was to have a prompt on the minibuffer and some indication that I am typing, such as a string of stars.