天天看點

git commit 使用 gpg 簽名

安裝 GPG

brew install gpg
           

生成key

gpg --gen-key
           

檢視key

gpg --list-keys
           

擷取公鑰

gpg --armor --export pub_key_ID
           

拷貝公鑰至 github

從 ----- BEGIN    
至 KEY BLOCK -----
           

配置git

git config --global user.signingkey <Pub_key_ID>
git config --global commit.gpgsign true