No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
- Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
- Create or import a key -- see below for https://keybase.io
- Run
gpg --list-secret-keys
and look forsec
, use the key ID for the next step - Configure
git
to use GPG -- replace the key with the one fromgpg --list-secret-keys
git config --global gpg.program /usr/local/MacGPG2/bin/gpg2
git config --global user.signingkey A6B167E1
git config --global commit.gpgsign true
- Optionally configure annotated tags to be GPG signed
git config --global tag.forceSignAnnotated true
- Add this line to
~/.gnupg/gpg-agent.conf
pinentry-program /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
- Add this line to
~/.gnupg/gpg.conf
no-tty
% keybase pgp export
% keybase pgp export -q CB86A866E870EE00 | gpg --import
% keybase pgp export -q CB86A866E870EE00 --secret | gpg --allow-secret-key-import --import
% open https://github.com/settings/keys
% keybase pgp export -q CB86A866E440EE00 | pbcopy
- https://github.com/pstadler/keybase-gpg-github
/usr/local/MacGPG2
-- this is where MacGPG binaries live- https://gpgtools.org
- https://www.git-tower.com
Initially, brew install gpg. But I had to undo this.
Then I installed gpg as instructed above.
Works perfectly now. Thank you so much!
I wonder though... I never had this problem and I don't know git is complaining about 'cannot run gpg...'.
I remember the only thing I did differently before all these happened was that I configured my dotfiles to change the way my terminal looks -- github.com/mathiasbynens/dotfiles
Can anyone say to have done the same? Because in a new (factory reset) laptop and a fresh installed git I believe you won't run into this problem.