Disable enter passphrase for each commit

I use Gpg4win for signing git commits. I want to disable enter passphrase each time, how I make commit, but I can’t do it.

See details in Stack Overflow question:


Stack Overflow answers doesn’t help me.



looks to me that you were on the right path (cache-ttl settings) but just used the wrong directory for the gpg-agent.conf ? Or was this a mistype?

I’ve answered on Stackoverflow:


It’s easiest to use Kleopatra to change GnuPG settings.

Hope I did not misunderstand your Problem.

Best Regards,

Andre Heinecke, I’ve comment your answer on Stack Overflow:



And responded :wink:

It seems to me that you would just like to remove the Passphrase of the key. Which is fine, as long as you control access to your key file. If you want to “cache” the passphrase between reboots this also means that everything that has access to your system can use that key and the passphrase would have to be stored somewhere between reboots. So it would need to be anywhere on the filesystem.

Andre Heinecke, thanks! I accept your answer.

Please, move information from your last comment ( https://stackoverflow.com/questions/49107180/5951529/49422432#comment85986884_49422432 ) to your answer (press «edit»).


Is password removing also possible for SMIME private keys ???

…becaue it seems that if once a SMIME private key is imported and was given a PW, it is not possible to remove the PW by deleting and re-importing the key. Because during the second import the OpenPGP-PW Dialogue is missing, only the FIRST PW type-in asking for the certificate-PW appears. So it seems the key with its OpenPGP-PW is “registered” and cannot be changed later.

in other words “pinentry-qt” is missing if a SMIME key was deleted and has to be imported again in order to give another OpenPGP-PW for that key.

Hi Zigg,
have you tried changing the password?

Yes, I did what I wrote.

I imported a SMIME private key and set a OpenPGP “pinentry-qt”.
Then I wanted to give that SMIME key an empty password. Therefore I deleted the private key and imported it in Kleopatra again. But during the second import, the “pinentry-qt” is misssing! Therefore it is not possible to set another PW for the key. For me it seems that if once a key is registered in pubring.kbx, it is not possible to change the “pinentry-qt” for that key.

Or do you know how to change “pinentry-qt” again?

my idea was to change the password after you had imported it.

One idea about your way is that you may need to restart gpg-agent.



I made a reboot before re-importing the SMIME key again.

Problem remains…

The solution is to manually delete the private key which is stored in a .KEY-File in the subfolder private-keys-v1.d, because the KEY-File will not be deleted using the “delete” function of Kleopatra (why not?)

But how to identify the correct KEY?



I found it out: “keygrip” identifies the key …

I think the rationale for not deleting the secret key parts is to prevent “disatrous” accidentall deletion of the secret key.

I don’t really agree with that but it’s an upstream GnuPG decision (There is no --delete-secret-key in GPGSM).

As for the passphrase:
I don’t understand, and Bernhard has asked this twice: Why don’t you just use “Change Passphrase” after Import in Kleopatra?
I just tested it and it works nicely to remove the passphrase there.

Apologies if you have already Answered this and I overlooked it.


I dont find any function “change passphrase” in Kleopatra! Would you please be so kind me to tell the menu for this function?


Ahh… I think I just found it.

I try it out.

Many thanks

Alright. It works. Many thanks!