0) Import your privat key $ gpg --import ~/.gnupg/gnupg-private-key.asc 1) Install the dependencies. $ brew install gpg pinentry-mac 2) Configure git to automatically sign commits. $ git config --global commit.gpgsign true 3) Add the following line to ~/.gnupg/gpg-agent.conf pinentry-program /usr/local/bin/pinentry-mac 4) Add this line to ~/.gnupg/gpg.conf no-tty 5) Finally you need to restart the gpg-agent $ gpgconf --kill gpg-agent Optional 6) List all GPG keys $ gpg --list-keys 7) Select the one you added to github $ git config --global user.signingkey [public key ID]