github启用 gpg?

65 阅读1分钟
  1. 安装 gpg

brew install gnupg 2. 生成密钥

www.ruanyifeng.com/blog/2013/0…

  1. 上传公钥

将上传的公钥配置到 github 中,是公钥,公开的密钥,不是私钥。

  1. 配置 git
git config --global gpg.program gpg
git config --global user.signingkey "长密钥 id"
git config --global commit.gpgsign true
  1. 配置,解决 error: gpg failed to sign the data 问题

export GPG_TTY=$(tty)