GPG Signature

2018/11/12 Git

Enable the GPG Signature on Git

After key generation following Official Guidance, use terminal to operate as below:

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

and copy the string after sec as SEC

git config --global gpg.program /Path/to/GPG

My brew installed gpg at /usr/local/Cellar/gnupg/2.2.10/bin/gpg

git config --global user.signingkey SEC
git config --global commit.gpgsign true

after above try

echo "test" | gpg --clearsign

if Inappropriate ioctl for device approach try add

export GPG_TTY=$(tty)

in .bash_profile and

source .bash_profile

test again, it should work and git-tower should work with signature now.

Important

If used a secure passphrase for the key, the Tower client may still can’t sign, if so, do

echo "test" | gpg --clearsign

in terminal first, it may ask you for the secure passphrase, unlock it and problem should been solved.

homepage

Document Info

Table of Contents