set gpg using keybase.io
Install gpg if you haven't on your system
brew install gpg
using keybase to geneterate gpg
keybase pgp gen --multi
code:sh
Enter your real name, which will be publicly visible in your new key: <Your Name>
Enter a public email address for your key: <Primary Email>
Enter another email address (or <enter> when done):
Push an encrypted copy of your new secret key to the Keybase.io server? Y/n y
When exporting to the GnuPG keychain, encrypt private keys with a passphrase? Y/n y
in one of the returning INFO 4096-bit RSA key, <GPG_KEY> will be disaplayed
Using the GPG_KEY register in your git
code:sh
git config --global user.signingkey <GPG_KEY>
git config --global commit.gpgsign true
Get ready to register to github
keybase pgp export -q <GPG_KEY> | pbcopy
Finally paste your GPG public key ctrl + v
Error that I encouter
code:sh
error: gpg failed to sign the data
fatal: failed to write commit object
Fixed by running echo "test" | gpg --clearsign which outuput
code:sh
gpg: signing failed: Inappropriate ioctl for device
code:.zshrc
GPG_TTY=$(tty)
export GPG_TTY