Github and other sites around the net have good info on this.
* https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
* https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key
* https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
### generate a key
```
gpg --full-generate-key
```
### get the key id
```
gpg --list-secret-keys --keyid-format=long
```
### armor it
```
gpg --armor --export 3AA5C34371567BD2
```
and paste that into your GH account.
If the email address does not match an email address on the account, you may need to take extra steps.
### tell git about the key
Get the key ID
```
gpg --list-secret-keys --keyid-format=long
```
and with the ID:
```
git config --global user.signingkey <id>
```
### tell git to sign by default
If you want all commits signed:
```
git config --global commit.gpgsign true
git config --global tag.gpgSign true
```
or, you can do it one-by-one:
```
git commit -S -m "YOUR_COMMIT_MESSAGE"
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I want to generate a GPG key and sign my commits, but I never remember how.
Github and other sites around the net have good info on this.
generate a key
get the key id
armor it
and paste that into your GH account.
If the email address does not match an email address on the account, you may need to take extra steps.
tell git about the key
Get the key ID
and with the ID:
tell git to sign by default
If you want all commits signed:
or, you can do it one-by-one: