爲gitlab添加GPG

爲gitlab添加GPG

下載安裝GnuPG

自行下載安裝:https://gnupg.org/download/

img

安裝結束後查看安裝信息:

gpg --version

img

生成

執行 gpg --full-generate-key 即可生成一對 gpg key pair

img

img

輸入兩次密碼

img

添加到gitlab

查看gpg --list-secret-keys

img

導出key

gpg --armor --export 你的keyID

img

img

打開命令行執行

git config --global user.name
git config --global user.email
git config --global commit.gpgsign true
git config --global tag.gpgsign true
git config --global gpg.program "C:\Program Files (x86)\GnuPG\bin\gpg.exe"
git config --global user.signingkey 你的keyID
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章