Override pinentry program in a terminal

password-store at storiepvtride.it password-store at storiepvtride.it
Mon May 18 10:43:37 CEST 2020

Am 17.05.20 um 23:16 schrieb Ismael Bouya:
> It’s quite outside of the scope of pass, so this discussion should
> probably happen somewhere else, but there is a way to do what you want:
> I wrote a wrapper that looks like that, which you need to put for instance in
> /usr/local/bin/pinentry-choose and use as the pinentry program

Ah very interesting, I didn't know about PINENTRY_USER_DATA, thanks!

For my case, I slightly changed your script based on this [0] suggestion:

case "${choice}" in
$program "$@"

Also worth noting that ~/.gnupg/gpg-agent.conf should be created/updated
accordingly with:

pinentry-program /path/to/pinentry-choose

*and* for changes to take effect, "gpg-agent" should be killed with:

$ gpgconf --kill gpg-agent

Now I have the passphrase/pin prompt from both the bash CLI and from the
UI as well.

I find this question completely on scope because gpg-agent is right
behind password-store, its understanding not always easy to grasp and
the usage examples scarce.



More information about the Password-Store mailing list