我按照這個教程:https://help.github.com/articles/signing-commits-using-gpg/gpg:跳過「XXBDXX4E」:密鑰不可用。 GPG:簽名失敗:不可用密鑰
我嘗試登錄時犯這樣的: https://github.com/spring-guides/tut-spring-boot-oauth2/commit/824f418ab9d04114b14a90f7c19b4b8d6dda67b7
但錯誤:
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
我的配置:
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 [email protected]
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) <[email protected]>
uid [ultimate] Do Nhu Vy (Do Nhu Vy) <[email protected]>
sub 2048R/C6B535A2 2016-06-10
(我註冊3封電子郵件,GitHub上:[email protected]
,[email protected]
和[email protected]
) 我已經錯了嗎?我如何簽署我的承諾?