gpt4 book ai didi

macos - gpg "failed to write commit object"

转载 作者:行者123 更新时间:2023-12-03 15:04:35 25 4
gpt4 key购买 nike

我正在尝试在OS X Mojave上启用提交签名。

git commit -S -am "Test"

错误是:
error: gpg failed to sign the data
fatal: failed to write commit object

我试过的
  • gpg正常运行(请参见下文),未安装gpg1gpg2
  • 安装了GPG KeyChain并添加了新 key (甚至添加了单独的仅签名子 key whithin)
  • 已安装pinentry
  • gpg2 --clearsign可以正常工作(为文件生成一个新的.asc文件,为纯文本输出文本)

  • 我调查并尝试了所有选项的问题:
  • gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]
  • Git error - gpg failed to sign data

  • 我究竟做错了什么?

    最佳答案

    我也有这个问题。我找到了一个很好的解决方案。
    提交前,只需尝试对文件签名。

    $ touch a.txt
    $ gpg --sign a.txt

    然后,操作系统将允许您输入密码。
    如果此步骤确定,现在您可以通过正确签名来提交。

    关于macos - gpg "failed to write commit object",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55037637/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com