MacOS High Sierra GPG Signing

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

Insert

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

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

Insert

use-agent

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

Append

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 user.name <YOUR_NAME>
git config --global user.email <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”

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store