AW: AW: WINDOWS - Adding passphrase to gpg via command line

Mike Kaufmann m.kaufmann at
Fri Jun 10 14:18:33 CEST 2016


I'll try it in english again :)

To me as a beginner it's not very handy to use GnuPG. It's very complicated.

I've tried to use the following commands in Windows Command Line to set passphrase in gpg-agent.
gpg-agent --allow-preset-passphrase
gpg-connect-agent PRESET_PASSPHRASE "MyKeyGrip" -1 "MyPassphrase"

I always receive the error message:
ERR 67108924 Not supported <GPG Agent> - no --allow-preset-passphrase

There are also many articles on the net that describe to add --allow-preset-passphrase to the file gpg-agent.conf. 
On my Windows 10 system I can't find such a file. Can I create an empty text file, change it's extension, add --allow-preset-passphrase to it and save it to the same location as the gpg.exe file?

You've mentioned the --pinentry-mode-lookback.
Could you give me some advice howto to use this option?
Whitch options do I have to set in gpg-agent?
Whitch commands do I have to execute in Windows Command Line to sign a file without pinentry dialog?

At the moment I use the following command:
gpg --homedir c:\PreProd\MyKeyRing --output C:\SignedFiles\temp.asc --armor -u info at --digest-algo SHA512 --sign c:\UnSignedFiles\temp.csv

What modifications do I have to made on my command to sign the file without passphrase dialog?

Kind Regards,

-----Ursprüngliche Nachricht-----
Von: Werner Koch [mailto:wk at] 
Gesendet: Freitag, 10. Juni 2016 13:46
An: Mike Kaufmann <m.kaufmann at>
Cc: gnupg-users at
Betreff: Re: AW: WINDOWS - Adding passphrase to gpg via command line

On Fri, 10 Jun 2016 10:23, m.kaufmann at said:

> Gibt es eine Möglichkeit, den KeyGrip aus dem KeyRing z.B. via 
> --homedir <Pfad zum KeyRing> zu ermitteln?


$ gpg --with-keygrip --with-fingerprint --with-colons -k 1e42b367

> Oder noch besser den KeyGrip gleich dynamisch im dem von Ihnen 
> vorgeschlagenen Befehl zu verwenden?

No, that is not possible becuase gpg-agent does not know about the OpenPGP protocol.



Please stick to English in this list ;-)
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
    /* EFH in Erkrath: */

More information about the Gnupg-users mailing list