Skip to content

Instantly share code, notes, and snippets.

@murielsilveira
Last active May 31, 2016 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save murielsilveira/e24c29d1a9a48d78e86c63a72a37bdc1 to your computer and use it in GitHub Desktop.
Save murielsilveira/e24c29d1a9a48d78e86c63a72a37bdc1 to your computer and use it in GitHub Desktop.
GPG Keys - How to use on GitHub

GPG Keys

Sum up:

brew install gnupg

gpg --gen-key
# choose key size of 4096
# inform your name and e-mail
# inform a secure passphrase
# the other options are all the default

gpg --armor --export KEY_ID
# copy and add to github: Setting > SSH and GPG keys (https://github.com/settings/keys)

git config --global user.signingkey KEY_ID
# tell git that you have a key

# to sign your commits there are the manual way:
git commit -S -m 'normal message, but the -S tell to sign your commit'
# and the automatic way, add to your .gitconfig the following (git version >2.0):
[commit]
    gpgsign = true

# be happy with your verified commits

SourceTree

Learn more

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