Skip to content

Instantly share code, notes, and snippets.

@adamabernathy
Created April 23, 2019 19:23
Show Gist options
  • Save adamabernathy/54e9f642c85432953846be5cddcbd341 to your computer and use it in GitHub Desktop.
Save adamabernathy/54e9f642c85432953846be5cddcbd341 to your computer and use it in GitHub Desktop.
Git and GPG

GitHub and GPG Signing

Create GPG key pair

gpg --full-generate-key

Assign Key to GH

gpg --list-secret-keys --keyid-format LONG
gpg --armor --export 62H62BDC69C7ETRW

Update git signing

brew upgrade gnupg
brew link --overwrite gnupg
brew install pinentry-mac
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
killall gpg-agent

# test
echo "test" | gpg --clearsign

git config --global user.name "Hellen Hunt"
git config --global user.email "[email protected]"
git config --global gpg.program gpg 
git config --global commit.gpgsign true

Be on your way!

@jacemcgough
Copy link

Thank you Adam, very cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment