5 export PATH="$HOME/.local/opt/gnupg/bin:$PATH"
6 export PATH="$HOME/.local/opt/gnupg/bin/pinentry-mac.app/Contents/MacOS:$PATH"
8 # TODO check for public key without gpg-pubkey?
9 if ! command -v gpg-pubkey; then
19 echo -n "Enabling automatic git commit signing...
20 git config --global user.signingkey ${MY_KEY_ID}
21 git config --global commit.gpgsign true
22 git config --global log.showSignature true
25 git config --global user.signingkey "${MY_KEY_ID}"
26 git config --global commit.gpgsign true
27 git config --global log.showSignature true
30 echo "Successfully updated ~/.gitconfig"
32 echo "How to verify signed commits on GitHub:"
34 echo " 1. Go to 'Add GPG Key': https://github.com/settings/gpg/new"
35 echo " 2. Copy and paste the key above from the first ---- to the last ----"