GPG介绍
待续
生成秘钥
待续
注意事项
Mac下无法输入密码
安装步骤
brew upgrade gnupg # This has a make step which takes a while
brew link --overwrite gnupg
brew install pinentry-mac
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
killall gpg-agent
测试
echo "test" | gpg --clearsign
在Git中使用签名
git config --global gpg.program gpg
git config --global commit.gpgsign true
注意这里均是全局的配置,单独项目设置,请移除
--global
Commit 时签名
git commit -S -m "add txt path"
查看 Git Commit 签名
git log --show-signature -1