GPG 坑后记

原创
2018/09/08 18:39
阅读数 605

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

链接

  1. Mac下安装和使用GunPG(GPG)
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部