Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bufordtaylor/f8a82675618b0a59b5bc42c679f2cf0b to your computer and use it in GitHub Desktop.
Save bufordtaylor/f8a82675618b0a59b5bc42c679f2cf0b to your computer and use it in GitHub Desktop.
Keybase.io + GitHub Verified Commits + macOS Keychain
# Install keybase and pinentry-mac
brew update
brew install keybase pinentry-mac
# Create a Keybase.io account and key
keybase signup
# Or if you have an account
keybase login
# Copy your key into gpg
keybase pgp export -s | gpg2 --allow-secret-key-import --import
# Edit your key to include your GitHub email
gpg2 --edit-key ericboehs adduid save
Eric Boehs
ericboehs@gmail.com
O
# Update your Keybase key with your GitHub email
keybase pgp update
# Copy your Keybase key to GitHub
keybase pgp export | pbcopy
open https://github.com/settings/keys
# Configure pinentry-mac to save passphrase in Keychain
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
# Silence "you need a passphrase" on commit signing
echo "batch" >> ~/.gnupg/gpg.conf
# Configure singing key for Git
git config --global user.signingkey ericboehs@gmail.com
# Configure gpg2 location
git config --global gpg.program gpg2
# Always sign commits
git config --global commit.gpgsign true
# That's it! Go commit something and push it to GitHub. You should see a "Verified" badge next to the commit.
# Further resources:
# - https://www.ahmadnassri.com/blog/github-gpg-keybase-pgp/
# - http://www.keybits.net/2016/02/import-keybase-private-key/
# - https://gist.github.com/cc21ec0a3a2df963bffa3c1f884b676b
brew update && brew install keybase pinentry-mac
keybase login
keybase pgp export -s | gpg2 --allow-secret-key-import --import
gpg2 --edit-key ericboehs adduid save
Eric Boehs
ericboehs@gmail.com
O
cd ~/.dotfiles && git pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment