一直用vscode推不了,每次看見到這個小圓點都很想點,但是每次都有報錯,

> git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - -S
gpg: skipped "danan <xx@qq.com>": No secret key
gpg: signing failed: No secret key
error: gpg failed to sign the data
fatal: failed to write commit object
解決方法:
-
安裝gunpg
下載地址:下載地址Github 默認使用了 GPG 進行簽名(用其自己的 key ),來保證提交資訊來自可靠的來源,
官方說明:
You can sign your work locally using GPG or S/MIME. GitHub will verify these signatures so other people will know that your commits come from a trusted source. GitHub will automatically sign commits you make using the GitHub web interface.
關于gunpg
GNU Privacy Guard(GnuPG或GPG)是一個密碼學軟體,用于加密、簽名通信內容及管理非對稱密碼學的密鑰,GnuPG是自由軟體,遵循IETF訂定的OpenPGP技術標準設計,并與PGP保持兼容,[5]
-
安裝后,配置環境變數 計算機->屬性->高級系統設定->環境變數

在cmd輸入gpg --version顯示如下

-
生成GPG密鑰
看官方檔案,寫的很詳細
檔案鏈接
注意第十二步,不用# Prints the GPG key ID, in ASCII armor format那一句,

-
在Git Bash終端配置gpg程式位置以及signingkey
沒錯,到了這一步,我失敗了,參考文章
原因時我沒有找到gpg2.exe
然后無計可施了嘛!?不!!!!!
原來在vscode上這個選項打開了,關掉就行

記一次失敗的配置之旅,笑
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/277724.html
標籤:區塊鏈
