- Open https://github.com/settings/gpg/new in a new tab
- Install gpg-suite
brew cask install gpg-suite
- Generate your gpg key
gpg --full-generate-key
NOTE: Enter 4096 for key size - View your gpg keys with
gpg --list-secret-keys --keyid-format
Sample:
gpg --list-secret-keys --keyid-format LONG
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
uid Hubot
ssb 4096R/42B317FD4BA89E7A 2016-03-10
- Copy 3AA5C34371567BD2 in this case, this will be your GPG ID
- Export your GPG key
gpg --armor --export GPG_ID
- Copy your key to page in Step 1.
gpg --armor --export GPG_ID | pbcopy
(this will copy your key in clipboard) - Paste it here https://github.com/settings/gpg/new
- On your gitconfig file add these lines:
[user]
signingkey = GPG_ID
[commit]
gpgsign = true