How to use Gnupg's passphrase-fd argument?

后端 未结 4 740
广开言路
广开言路 2020-12-23 20:42

I would like to use GnuPG´s decrypt command without any user interation. The script\'s --passphrase-fd argument seems exactly what I need. But I do

4条回答
  •  情话喂你
    2020-12-23 21:30

    kylehuff's answer still wouldn't work for me, with gpupg still popping up a password prompt.

    According to https://wiki.archlinux.org/index.php/GnuPG#Unattended_passphrase with gnupg version 2.1.0 and higher, you need to do additional steps to support --passphrase-fd

    First, edit the gpg-agent configuration to allow loopback pinentry mode: ~/.gnupg/gpg-agent.conf

    allow-loopback-pinentry
    

    Restart the gpg-agent process if it is running to let the change take effect.

    Second, either the application needs to be updated to include a commandline parameter to use loopback mode like so:

    $ gpg --pinentry-mode loopback ...
    

提交回复
热议问题