gpt4 book ai didi

windows - 在 Windows 上签署 git commit 时出现 "No secret key"错误

转载 作者:行者123 更新时间:2023-12-03 11:05:02 25 4
gpt4 key购买 nike

尝试签署提交时出现此错误:

git commit -S -m "test"
gpg: skipped "EF617ACA9EC3XXXX": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object

这是 gpg --list-secret-keys --keyid-format LONG 的输出

key 在那里
sec   rsa4096/EF617ACA9EC3XXXX 2020-05-17 [SC] [expires: 2022-05-17]
AD68154000A712DCD161D826EF617ACA9EC3XXXX
uid [ultimate] name <email@gmail.com>

这是具有相同 key 的 git config
user.signingkey=EF617ACA9EC3XXXX
user.email=email@gmail.com

知道出了什么问题吗?

最佳答案

首先检查 git config gpg.program 看看这是不是gpggpg2 (如 in here )。

并输入 where gpg nd where gpg2检查哪个路径被考虑用于 GPG 程序。

我建议设置 gpg.programgpg2 ,并复制您的 gpg.exe (假设它的版本是 2.x)到 gpg2.exe
这应该强制 Git/GPG 充当 gpg2。

关于windows - 在 Windows 上签署 git commit 时出现 "No secret key"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61849061/

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