Here's my sanitized .gitconfig for reference:
View it here
My other useful configs:
These steps make sure Git uses Gpg4win/Kleopatra for commit signing, with an 8-hour TTL and Kleopatra's pinentry GUI.
- Install Gpg4win.
- Note your install path, e.g.
C:\Program Files (x86)\GnuPG\bin.
git config --global commit.gpgsign true
git config --global gpg.program "C:/Program Files (x86)/GnuPG/bin/gpg.exe"
git config --global user.signingkey <YOURKEYID>Add this to ~/.bashrc:
export PATH="/c/Program Files (x86)/GnuPG/bin:$PATH"Reload:
source ~/.bashrcCreate ~/.gnupg/gpg-agent.conf:
default-cache-ttl 28800
max-cache-ttl 86400
pinentry-program C:/Program Files (x86)/Gpg4win/bin/pinentry-w32.exe
gpgconf --kill gpg-agentecho "test" | gpg --clearsign # should show Kleopatra GUIgpg-connect-agent 'keyinfo --list' /byeLook for the last field (T <timestamp>) → when your passphrase cache
expires.