Gpg4win 3.0.0 passphrase prompt
Closed, ResolvedPublic


Though we provide gpg command with passphrase, it is prompting for passphrase every time.
Correct me if i have typed the command wrongly.
gpg --yes --always-trust -o %1.asc -saeu <email> -r <email> --batch --passphrase <passphrase> %1

the same command worked perfectly fine with GPG 2.3.3 version without passphrase prompt.


Nagi created this task.Oct 11 2017, 1:14 AM
aa added a subscriber: aa.Oct 11 2017, 1:19 AM

is it 8 digit challenger ?

Nagi added a comment.Oct 11 2017, 1:22 AM

i am sorry what is 8 digit challenger?

imagine a 00000000 and the last digit is ON 00000001

Nagi added a comment.Oct 11 2017, 1:34 AM

no it is not

You're saying you did not typed wrong

"Correct me if i have typed"

Nagi added a comment.Oct 11 2017, 6:33 AM

I mean correct me if there is anything wrong in the command

werner renamed this task from GPG 3.0.0 passphrase prompt to Gpg4win 3.0.0 passphrase prompt.Oct 11 2017, 8:53 AM
werner added a project: gpg4win.
werner added a subscriber: werner.Oct 11 2017, 8:59 AM

The private key, which is protected by a passphrase, is handled by gpg-agent. If you really don't want a passphrase (you have it in a script or the command line history anyway) I suggest to remove the passphrase from that key. Other options are

  • Increase the cache timeout (e.g. put "default-cache-ttl 3600" into gpg-agent.conf
  • Use gpg-preset-passphrase
  • Use the loopback feature by adding "--pinentry-mode loopback" to the gpg invocation
Nagi added a comment.Oct 11 2017, 4:23 PM

Thanks Werner for your suggestion, but what I am wondering is , in the previous versions "--passphrase" option would be used to provide passphrase in the command line and thus prevent prompt to get input from us every time. This helped to automate the encryption process. But now in 3.0.0 regardless of option, it keeps prompting for passphrase.

aheinecke closed this task as Resolved.Nov 13 2017, 9:59 AM
aheinecke claimed this task.
aheinecke added a subscriber: aheinecke.

Nagi: The third suggestion (adding "--pinentry-mode loopback" to your command) should work in that case.

As this question is frequently asked I noted this in the wiki: