MacOS High Sierra GPG Signing
1 min readAug 6, 2018
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
- Create a Commit and toggle “Save in Keychain”
- Restart your Mac
- There should now be a “GnuPG” entry in your Keychain