爲gitlab添加GPG
下載安裝GnuPG
自行下載安裝:https://gnupg.org/download/
安裝結束後查看安裝信息:
gpg --version
生成
執行 gpg --full-generate-key
即可生成一對 gpg key pair
輸入兩次密碼
添加到gitlab
查看gpg --list-secret-keys
導出key
gpg --armor --export 你的keyID
打開命令行執行
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