Choose 4096 bits with otherwise default settings.
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
should produce:
/Users/hubot/.gnupg/secring.gpg
------------------------------------
sec 4096R/your-gpg-key-here 2016-03-10 [expires: 2017-03-10]
uid Hubot
ssb 4096R/42B317FD4BA89E7A 2016-03-10
where your GPG key ID in the above example is your-gpg-key-here
(but will actually be a series of numbers and letters)
gpg --armor --export your-gpg-key-here
Copy and paste the public block, including -----BEGIN PGP PUBLIC KEY BLOCK-----
and -----END PGP PUBLIC KEY BLOCK-----
. It should look something like this
- https://github.com/settings/keys
- Click New GPG key
- Paste in your public block, then hit Add GPG key
- Optional: turn on Vigilant mode
git config --global user.signingkey your-gpg-key-here
set -Ux GPG_TTY (tty)
git config --global commit.gpgsign true
Otherwise, use the -S
flag (e.g git commit -S -m "your commit message here"
)