小编Chr*_*len的帖子

`git -S -m commit`没有要求输入密码 - 从GPG mac转移到GPG shell后签名

我正在为web开发设置新机器(macOS Sierra),我已经完成brew install gpg了已安装gpg2gpg-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)

git macos github gnupg pgp

7
推荐指数
2
解决办法
1536
查看次数

标签 统计

git ×1

github ×1

gnupg ×1

macos ×1

pgp ×1