Page MenuHome GnuPG

--batch --passphrase throwing password prompt as of 3.0.0
Closed, ResolvedPublic

Description

I have existing code using:

gpg --batch --passphrase "<string>" --output "<output file>" --decrypt "<input file>"

(note that my environment for using this feature is secure, so no need to debate merits of using this method)

In 2.3.4 this works as expected and my application can provide the needed password and all works as expected.

In 3.0.0 this string causes gpg.exe to throw an "enter password" prompt.

Details

Version
3.0.0

Event Timeline

Passphrase handling changed a lot with gpg 2.1.

However you can tell gpg-agent to let gpg ask for the passphrase. Add

--pinentry-mode=loopback

to the gpg invocation.

Thanks you very much for your quick reply. I added your code to my invocations for decryption and signing and all is well now. You probably saved me many hours of searching with your kind reply!

aheinecke claimed this task.
aheinecke added a subscriber: aheinecke.