Skip to content

Instantly share code, notes, and snippets.

@lukehedger
Last active December 14, 2020 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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