meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| git:pgp [2022/10/05 21:17] – created niziak | git:pgp [2022/10/06 10:55] (current) – niziak | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== signing git commits ====== | ====== signing git commits ====== | ||
| - | ===== configure remote machine ===== | ||
| - | Public key must be imported on remote machine | + | See [[sw:gpg: |
| - | <code bash> | + | |
| - | gpg --import usert@example.com-public.asc | + | |
| - | gpg: key XXXXXXXXXXXXX: | ||
| - | gpg: Total number processed: 1 | ||
| - | gpg: | ||
| - | </ | ||
| <code bash> | <code bash> | ||
| git config --global user.signingkey XXXXXXXXXXXXX | git config --global user.signingkey XXXXXXXXXXXXX | ||
| + | </ | ||
| + | |||
| + | Enable signing of each commit by default: | ||
| + | <code bash> | ||
| git config --global commit.gpgsign true | git config --global commit.gpgsign true | ||
| </ | </ | ||
| + | |||
| + | ===== signing and verifying ===== | ||
| + | |||
| + | <code bash> | ||
| + | git verify commit < | ||
| + | |||
| + | gpg: using RSA key XXXXXXXXXX | ||
| + | gpg: Good signature from "User < | ||
| + | gpg: WARNING: This key is not certified with a trusted signature! | ||
| + | gpg: There is no indication that the signature belongs to the owner. | ||
| + | Primary key fingerprint: | ||
| + | </ | ||
| + | |||
| + | See [[sw: | ||
| + | |||
| + | |||
| + | |||