GPG
How to generate and use GPG Keys.
Generate Key
- gpg --full-generate-key
- Select defaults or the required option if you have them
- Select an expiration date
-
Enter your personal information (it needs to be consistent with your account info)
- Use a secure passphrase
Key can be listed with:
gpg --list-secret-keys --keyid-format=long
Key can exported with:
gpg --armor --export <key>
Screenshots:
Add Keys to Github/Gitea
Github
- Settings
- SSH and GPG keys
- New GPG Key
- Paste in the public key block
- Add GPG Key
- Turn on Vigilant mode
Gitea
- Settings
- SSH / GPG Keys
- Add Key
- Paste in the public key block
- Add Key
- Verify
Screenshot:
Telling Git about your Key
gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey <key>