我已经搜索了整个宇宙这个错误,但我找不到任何有用的提示。
我使用 keybase 创建了一个密钥并将我的公钥添加到 github gpg
我的gpg --list-secret-keys --keyid-format LONG
是这个
--------------------------------
sec rsa4096/7E8*******60B47B 2021-03-06 [SC] [expires: 2037-03-02]
51FBCD0E******************014D4860B47B
uid [ultimate] Fatih <********@live.be>
uid [ultimate] Fatih <[email protected]>
ssb rsa4096/15BBF8A123C4AC1B 2021-03-06 [E] [expires: 2037-03-02]
我的 .gitconfig is this
[user]
signingkey = 7E8*******60B47B
email = [email protected]
name = kgnfth
[commit]
gpgsign = true
[gpg]
program = gpg
我添加export GPG_TTY=$(tty)
到我的 .zshrc 文件中
每次我运行 git commit -m "first commit",我都会收到这个错误
error: gpg failed to sign the data
fatal: failed to write commit object
我没有发现签名密钥有任何问题我也尝试将 gpg 更改为 gpg2 但出现相同的错误
我不知道我需要你的帮助
谢谢你。
我通过将 gpg-agent 插件添加到我的 zshrc 配置文件中解决了我的问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句