gpg --full-gen-key
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
GPG_KEY_ID=3AA5C34371567BD2
firefox https://github.com/settings/gpg/new
git config --global user.signingkey $GPG_KEY_ID
cd repo
vim .git/config
################### LOCAL GIT CONFIG ####################
[user]
name = <name> <first_name>
email = <email>
signingkey = 3AA5C34371567BD2
[remote "origin"]
url = [email protected]:<github_username>/<repo>.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[commit]
gpgsign = true
git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name <[email protected]>'" HEAD~N..HEAD