gpt4 book ai didi

git 提交签名失败 : secret key not available

转载 作者:IT王子 更新时间:2023-10-29 00:39:40 27 4
gpt4 key购买 nike

我在尝试使用 Git 提交时遇到此错误。

gpg: skipped "name <name@mail.com>": secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
fatal: failed to write commit object

我已经生成了一个新的 key ,如下所示,但它仍然给出同样的错误

gpg --list-keys
~/.gnupg/pubring.gpg
--------------------------------
pub 2048R/35F5FFB2 2016-04-23
uid name (New key) <name@mail.com>
sub 2048R/112A8C2D 2016-04-23

秘钥同上

我找到了 Generating a GPG key for git tagging并按照步骤操作,但它仍然不起作用,知道吗?

最佳答案

这对我在 Windows 10 上有效(请注意,我使用 gpg.exe 的绝对路径):

git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"

这是我在修复之前遇到的错误:

gpg: skipped "3E81C*******": secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
fatal: failed to write commit object

关于git 提交签名失败 : secret key not available,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36810467/

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