Skip to content

Instantly share code, notes, and snippets.

@rymcol
Last active May 19, 2018 19:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rymcol/8fac499762c0e85097e63d026ae6146d to your computer and use it in GitHub Desktop.
Save rymcol/8fac499762c0e85097e63d026ae6146d to your computer and use it in GitHub Desktop.
Global GPG Commit Signing for Git
#!/bin/bash
#Setup git
git config --global user.name "My Name"
git config --global user.email "my@email.com"
#Setup Signing Key
git config --global user.signingkey <key id here>
#Sign All
git config --global commit.gpgsign true
#Allow programs like Xcode, Tower, and SourceTree to Work with Globabl GPG Signing
echo no-tty >> ~/.gnupg/gpg.conf
#Specify absolute path to avoid program errors (Sometimes affects applicastions like Xcode and Tower)
git config --global gpg.program /usr/local/bin/gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment