From here
- Install Gpg4win from Gpg4win Official Website
- During install, select to install the component Kleopatra.
- Import GPG key or generate new gpg key in Kleopatra.
- In git, set git
config --global gpg.program
value to path/to/ - Enable global GPG signing:
git config --global user.signingkey <key name> git config --global commit.gpgsign true git config --global gpg.program "path/to/GnuPG/bin/gpg.exe"
- Set no password time: In Kleopatra, Settings => GnuPG System => Private Keys => Expire cached PINs after N seconds, set this to some time.