我正在为web开发设置新机器(macOS Sierra),我已经完成brew install gpg了已安装gpg2和gpg-agent.我从~.gnupg旧Mac上复制了我的钥匙.我没有安装我在旧机器上的mac接口GPG Suite,因为我真的更喜欢使用命令行.
我已经使用适当的设置设置了我的git全局变量.
git config --global user.name "Christopher Allen"
git config --global user.email "ChristopherA@LifeWithAlacrity.com"
git config --global user.mail "ChristopherA@LifeWithAlacrity.com"
git config --global user.signingKey F8D36C91357405ED
Run Code Online (Sandbox Code Playgroud)
当我尝试将更改提交到需要的git存储库git config commit.gpgsign=true时,在我的旧GPG Suite上,我会弹出一个窗口,询问我的密码.但是,仅使用GPG,它可以正确找到我的公钥,但它不会提示我输入密码进行签名.
$ git commit -S -m "changed code"
You need a passphrase to unlock the secret key for
user: "Christopher Allen <ChristopherA@LifeWithAlacrity.com>"
4096-bit RSA key, ID 357405ED, created 2015-04-16
error: gpg failed to sign the data
fatal: failed …Run Code Online (Sandbox Code Playgroud)