GPG

How to generate and use GPG Keys.

Generate Key

  1. gpg --full-generate-key
  2. Select defaults or the required option if you have them
  3. Select an expiration date
  4. Enter your personal information (it needs to be consistent with your account info)

  5. 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:

image.png

FyAimage.png

Add Keys to Github/Gitea

Github

  1. Settings
  2. SSH and GPG keys
  3. New GPG Key
  4. Paste in the public key block
  5. Add GPG Key
  6. Turn on Vigilant mode

Gitea

  1. Settings
  2. SSH / GPG Keys
  3. Add Key
  4. Paste in the public key block
  5. Add Key
  6. Verify

Screenshot:

vDXimage.png

Telling Git about your Key

gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey <key>

Screenshot:

Mxvimage.png