You should sign your commits

why would I do that?

Verified

git without commit signing

Git flow without commit signing allows anyone to claim to be anyone else

git with commit signing

Commit signing stops people impersonating others

git with enforced commit signing

Commit signing stops people impersonating others

signing commits verifies the author

What's the deal with keys?

How do we do this?

gpg --full-generate-key kind: (4) RSA (sign only) keysize: 4096 valid for: 1y
gpg --list-keys youremail@example.org gpg --edit-key YOURMASTERKEYID addkey RSA (sign only) / 4096 / 1y save
gpg --export --armor --output public.key youremail@example.org gpg --export-secret-keys --armor --output secret.key youremail@example.org
gpg -K gpg --delete-secret-key YOURMASTERKEYID

(don't delete the subkey when prompted)

gpg -K

(your private key should show sec# instead of just sec now)

.gitconfig

[user]
  signingKey = SUBKEYID!
[commit]
  gpgsign = true
                

Get your subkey ids with:

gpg --list-keys --keyid-format long

This is the last slide