zach.codes

zach.codes

Share this post

zach.codes
zach.codes
Setting up GPG Signing for GitHub on Mac

Setting up GPG Signing for GitHub on Mac

Zach Silveira
Feb 11, 2017
∙ Paid

Share this post

zach.codes
zach.codes
Setting up GPG Signing for GitHub on Mac
Share

I know you want to have a verified badge like this next to your commits on github. On one hand, it's awesome. If you're not famous and aren't verified on Twitter, this feels almost as cool. The second reason is because you're reading this article!

Setting up gpg keys can be a little annoying. Even if you follow the simple steps to generate one and let git know about it, you're going to be stuck typing a password on every commit if you don't setup an agent to handle adding it to your keychain for you. I've followed a couple different guides across multiple computers to end up with a combination of them in this guide. With that being said, get started by having homebrew installed, and we'll go from there.

brew install gnupg gnupg2

The following is straight from GitHub

gpg --gen-key

gpg --list-secret-keys --keyid-format LONG

If you're confused about finding your key id, check step 11.

gpg --armor --export KEY_ID

Copy the output from above and add it to GitHub

git config --global commit.gpgsign tr…

Keep reading with a 7-day free trial

Subscribe to zach.codes to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Zach Silveira
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share