brew install gpg2 gpg-agent pinentry-mac
pinentry-program /usr/local/bin/pinentry-mac
use-agent
export GPG_TTY="tty"
Use "RSA and RSA" and "4096" parameters.
gpg --full-gen-key
chmod 700 ~/.gnupg
~ gpg --list-secret-keys --keyid-format LONG
/Users/username/.gnupg/pubring.kbx
--------------------------------
sec rsa4096/%GPG_key_ID% 2018-01-01 [SC]
1010101010101010101010101010101010101010
uid [ultimate] User Name <[email protected]>
ssb rsa4096/1010101010101010 2018-01-01 [E]
%GPG_key_ID% is your GPG key ID
gpg --armor --export %GPG_key_ID%
Copy your GPG key, beginning with -----BEGIN PGP PUBLIC KEY BLOCK-----
and ending with -----END PGP PUBLIC KEY BLOCK-----
to https://github.com/settings/keys
[log]
showSignature = true
[commit]
gpgsign = true
[gpg]
program = /usr/local/bin/gpg
[user]
name = User Name
email = [email protected]
signingkey = %GPG_key_ID%