gpt4 book ai didi

git - gpg : skipped "XXBDXX4E": secret key not available. gpg:签名失败: key 不可用

转载 作者:太空狗 更新时间:2023-10-29 13:19:59 28 4
gpt4 key购买 nike

我遵循本教程:https://help.github.com/articles/signing-commits-using-gpg/

我尝试像这样提交时签名: https://github.com/spring-guides/tut-spring-boot-oauth2/commit/824f418ab9d04114b14a90f7c19b4b8d6dda67b7

enter image description here

但是错误:

C:\Users\Administrator\Desktop\foo\test_gpg>git commit -m "test"
gpg: skipped "DABDD34E": secret key not available
gpg: signing failed: secret key not available
error: gpg failed to sign the data
fatal: failed to write commit object

enter image description here enter image description here enter image description here enter image description here

我的配置:

C:\Users\Administrator\Desktop\foo\test_gpg>git config --list --show-origin
file:"C:\\ProgramData/Git/config" core.symlinks=false
file:"C:\\ProgramData/Git/config" core.autocrlf=true
file:"C:\\ProgramData/Git/config" core.fscache=true
file:"C:\\ProgramData/Git/config" color.diff=auto
file:"C:\\ProgramData/Git/config" color.status=auto
file:"C:\\ProgramData/Git/config" color.branch=auto
file:"C:\\ProgramData/Git/config" color.interactive=true
file:"C:\\ProgramData/Git/config" help.format=html
file:"C:\\ProgramData/Git/config" http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
file:"C:\\ProgramData/Git/config" diff.astextplain.textconv=astextplain
file:"C:\\ProgramData/Git/config" rebase.autosquash=true
file:"C:\\Program Files\\Git\\mingw64/etc/gitconfig" credential.helper=manager
file:C:/Users/Administrator/.gitconfig user.name=donhuvy
file:C:/Users/Administrator/.gitconfig user.email=donhuvy@hotmail.com
file:C:/Users/Administrator/.gitconfig user.signingkey=DABDD34E
file:C:/Users/Administrator/.gitconfig commit.gpgsign=true
file:C:/Users/Administrator/.gitconfig use.signingkey=DABDD34E
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=false
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.symlinks=false
file:.git/config core.ignorecase=true
file:.git/config core.hidedotfiles=dotGitOnly
file:.git/config remote.origin.url=https://github.com/donhuvy/test_gpg.git
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master
file:.git/config commit.gpgsign=true

C:\Users\Administrator\Desktop\foo\test_gpg>gpg --list-key
C:/Users/Administrator/AppData/Roaming/gnupg/pubring.gpg
--------------------------------------------------------
pub 2048R/DABDD34E 2016-06-10
uid [ultimate] donhuvy (Do Nhu Vy) <v@vyhn.net>
uid [ultimate] Do Nhu Vy (Do Nhu Vy) <v@vyhn.net>
sub 2048R/C6B535A2 2016-06-10

(我在 GitHub 上注册了 3 个邮箱:v@vyhn.netdonhuvy@hotmail.comxxxxx@gmail.com)我做错了什么?我如何签署我的 promise ?

最佳答案

我也遇到了同样的问题。不幸的是,错误消息并没有指出真正的问题....这是你没有配置 git 来使用你正在使用的 gpg 程序,我怀疑它是 gpg4win。[我只在 Win 机器上遇到过这个]

git config --global gpg.program "C:/Program Files (x86)/GNU/GnuPG/gpg2.exe"

请运行上面的命令,然后运行下面的命令。

git config user.signingkey DABDD34E

您可能需要重新启动终端;并重新发出你的 git commit 命令。

希望这对您有所帮助。

关于git - gpg : skipped "XXBDXX4E": secret key not available. gpg:签名失败: key 不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37780976/

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