Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Last active November 29, 2024 08:27
Show Gist options
  • Save lukehedger/d26ff1d05110f5a3bca4e8e68205ecf7 to your computer and use it in GitHub Desktop.
Save lukehedger/d26ff1d05110f5a3bca4e8e68205ecf7 to your computer and use it in GitHub Desktop.
Config for automatically signing Git commits

Git Commit Signing

Windows

.gitconfig

[user]
	signingkey = <GPG_KEY_ID>
[commit]
	gpgsign = true
[gpg]
	program = C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe

Mac

.gitconfig

[user]
	signingkey = <GPG_KEY_ID>
[commit]
	gpgsign = true
[credential]
	helper = osxkeychain

.bashrc/.zshrc

# Enable passphrase prompt for gpg
export GPG_TTY=$(tty)

VS Code

settings.json

"git.enableCommitSigning": true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment