MacOS High Sierra GPG Signing

Pascal Andermatt

Verified Commits

Step 1. Install Software

brew install gpg2 gnupg pinentry-mac

Info: gpg-agent is not more available but you can use gnupg

Step 2. Create ~/.gnupg/gpg-agent.conf


pinentry-program /usr/local/bin/pinentry-mac

Step 3. Create ~/.gnupg/gpg.conf



Step 4. Modify ~/.bashrc or ~/.zshrc


export GPG_TTY="tty"

Restart Terminal

Step 5. Generate your Key

Add GPG key to your GitHub Account

Step 6. Configure Git

git config --global <YOUR_NAME>
git config --global <YOUR_EMAIL>
git config --global user.signingkey <YOUR_KEY_ID>
git config --global commit.gpgsign true
git config --global gpg.program $(which gpg)

Step 7. Store password in keychain

  1. Create a Commit and toggle “Save in Keychain”
  2. Restart your Mac
  3. There should now be a “GnuPG” entry in your Keychain

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade