跳转至

tell git using gpg sign key

generate

gpg --full-generate-key

list

gpg --list-secret-keys --keyid-format LONG

tell git to use the gpg key

git config --global user.signingkey xxx

add public key to Github

gpg --armor --export xxx

go to https://github.com/settings/gpg/new to add public key.