0
votes

Windows 7, GnuPG 2.1.19

I'm having a hell of time trying to automate decryption of files using GPG. I've tried all of the variations that I can find to pass the passphrase to the command line, but all continue to prompt me via the pop-up box. And, yes, I understand the security implications of including the passphrase in the command line, passphrase file, batch file, etc. Apparently, most people can get this to work:

echo mypassphrase| gpg --batch --output test.csv --passphrase-fd 0 --decrypt test.csv.pgp

I've tried using the --passphrase-file switch. I've tried using --passphrase mypassphrase. I've tried various spacing and quoting variations. I'm pulling my hair out here. Thanks for any tips!

1
As a clarification, it appears that the command above will work sometimes, and only after I've entered the passphrase manually once (it'll sometimes work on subsequent runs of a PowerShell program in which I'm running it.)Ryk

1 Answers

0
votes

I resolved this problem on my own. I found that in version 2.1x of GnuPG, you have to add the "--pinentry-mode loopback" option and value.