Sign GitHub Commit on Windows
A guide to sign GitHub commit on Windows
Every commit, cryptographically yours.
GitHub shows a green “Verified” badge on commits signed with GPG. On Windows, Git for Windows already ships with gpg — you just need to expose it and wire up the config.
First, add C:\Program Files\Git\usr\bin\ to your PATH.
Generate and Export the Key
Generate a new GPG key:
gpg --full-generate-keyList it to get the key ID:
gpg --list-secret-keys --keyid-format=longOutput:[keyboxd]---------sec ed25519/C50213C2685D0XXX 2025-04-30 [SC] [expires: 2030-04-29] 9D01A4041614F5DF7C9A1EC9C50213C2685D0XXXuid [ultimate] Your Name <you@mail.com>ssb cv25519/B962022817E5DXXX 2025-04-30 [E] [expires: 2030-04-29]Export the public key:
gpg --armor --export C50213C2685D0XXXCopy the output and add it to your GitHub account under Settings > SSH and GPG keys.
Configure Git
git config --global user.signingkey C50213C2685D0XXXgit config --global tag.gpgSign truegit config --global commit.gpgsign truegit config --global gpg.program "C:\\Program Files\\Git\\usr\\bin\\gpg.exe"Setting gpg.program explicitly is important — if you have another gpg installed elsewhere on your PATH, Git will find the wrong one.