Pinentry pops up allthough --passphrase-fd is used
Dirk Mika
dirk.mika at bayer.com
Tue Oct 20 11:13:01 CEST 2015
>Dirk Mika asked:
>...
>> If the following command is given for the first time and the gpg-agent
>> is not yet running the pinentry-windows pops up ...
>> echo "-censorship-" | gpg --batch --passphrase-fd 0 ...
>>
>> Is this intended behavior? Do I need to start the agent in advance (how)?
>
>No, that is not intended. (Please indicate what version of gnupg you are using
>when you email the list.) You might try to actively discourage the agent
>from intruding by adding the --no-use-agent option to your call.
I'm using version 2.1.9. And that's the reason why --no-use-agent won't work. :-) And although mentioned in the docs that gpg2 always requires the agent I tried it anyway. :-)
>You can also use the --debug-all flag to see if it gives any hint
>on why the agent is being called.
I've used the flag and got a huge amount of information but nothing that gave me a hint what's causing this issue.
I did some more tests and figured out that all passphrase options (--passphrase-fd, --passphrase-file and --passphrase) are ignored. And it doesn't matter if I add one of these to the command line or not. When the agent is not running it is started and pinentry pops up. If the agent is running the passphrase is cached (or the key, I don't know) and pinentry does not appear.
I then tried version 2.0 instead of 2.1 and with this version I successfully managed to decrypt a file without having to enter the passphrase.
Best regards,
Dirk Mika
More information about the Gnupg-users
mailing list