Home 为git_commit_增加签名
Post
Cancel

为git_commit_增加签名

refer to:  https://gist.github.com/ankurk91/c4f0e23d76ef868b139f3c28bde057fc 

https://www.linuxjournal.com/content/signing-git-commits

1. 创建一个新的gpg: 

# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
brew install gpg

2. 生成: gpg --gen-key

3. 列出来:

gpg --list-secret-keys --keyid-format LONG

/home/siwei/.gnupg/pubring.kbx
------------------------------
sec   rsa3072 2022-11-24 [SC] [expires: 2024-11-23]
      6C2C2BD583316484B50A163E087CE354F6E0328C
uid           [ultimate] xx <[email protected]>
ssb   rsa3072 2022-11-24 [E] [expires: 2024-11-23]

This post is licensed under CC BY 4.0 by the author.