Skip to content

Instantly share code, notes, and snippets.

@ruyadorno
Forked from bmhatfield/.profile
Last active July 17, 2017 18:48
Show Gist options
  • Save ruyadorno/a33df73f55590d1d94ce6d1b9a3502ca to your computer and use it in GitHub Desktop.
Save ruyadorno/a33df73f55590d1d94ce6d1b9a3502ca to your computer and use it in GitHub Desktop.
Automatic Git commit signing with GPG on OSX

How to set up Git GPG signed commits

1. Generate GPG key

https://help.github.com/articles/generating-a-new-gpg-key/

  • PS: During latest setup homebrew ended up installing gpg as gpg2, that requires some very minor tweaks and of course making sure the commands use gpg2 instead of gpg
  • PS2: Make sure to save key to 1 Password or equivalent

2. Add key to Github account

https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account/

3. Add key to .gitconfig

https://help.github.com/articles/telling-git-about-your-gpg-key/

PS: If setup is using gpg2, also runs:

git config --global gpg.program gpg2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment