Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| git_writing_an_arbitrary_blob [2019/02/26 13:18] – created rpjday | git_writing_an_arbitrary_blob [2025/06/13 11:56] (current) – rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Overview ===== | ===== Overview ===== | ||
| - | How to write an arbitrary blob to a repository to add " | + | How to write an arbitrary blob to a repository to add " |
| + | |||
| + | NOTE: Junio Hamano eventually decided this was a bad idea, as you can see here: [[https:// | ||
| ===== The recipe ===== | ===== The recipe ===== | ||
| Line 14: | Line 16: | ||
| < | < | ||
| - | $ git show -p 8a1385ff5d6ab8c195f99931042b7afaf418e6b0 | + | $ git show 8a1385ff5d6ab8c195f99931042b7afaf418e6b0 |
| Robert P. J. Day | Robert P. J. Day | ||
| $ | $ | ||
| Line 31: | Line 33: | ||
| Robert P. J. Day | Robert P. J. Day | ||
| $ | $ | ||
| + | </ | ||
| + | |||
| + | In fact, this technique is used by Git maintainer Junio Hamano to disseminate his public GPG key with the Git source code: | ||
| + | |||
| + | < | ||
| + | $ git show junio-gpg-pub | ||
| + | tag junio-gpg-pub | ||
| + | Tagger: Junio C Hamano < | ||
| + | Date: Thu Nov 20 15:12:15 2014 -0800 | ||
| + | |||
| + | GPG key to sign git.git archive | ||
| + | |||
| + | This blob contains the GPG public key I use to sign git.git archive. | ||
| + | |||
| + | To use it to verify tags I signed, do: | ||
| + | |||
| + | $ git-cat-file blob junio-gpg-pub | gpg --import | ||
| + | |||
| + | to import it into your keyring, and then | ||
| + | |||
| + | $ git-tag -v $tag_to_be_verified | ||
| + | |||
| + | The fingerprint information for the key is as follows: | ||
| + | |||
| + | $ gpg --fingerprint -k 96AFE6CB\! | ||
| + | pub | ||
| + | Key fingerprint = 96E0 7AF2 5771 9559 80DA D100 20D0 4E5A | ||
| + | 7136 60A7 | ||
| + | uid Junio C Hamano < | ||
| + | uid Junio C Hamano < | ||
| + | uid Junio C Hamano < | ||
| + | sub | ||
| + | sub | ||
| + | sub | ||
| + | -----BEGIN PGP SIGNATURE----- | ||
| + | Version: GnuPG v1 | ||
| + | |||
| + | iQIcBAABAgAGBQJUbnV7AAoJELC16IaWr+bLvjYP+wSOG8rp1y77ExHDJQj7HBLm | ||
| + | 9PVQIb70tkiBxAGUpVNNbaoJQBuMAgFdT4Baj8CIo2jdzDeeqbjtcdy/ | ||
| + | |||
| + | ... etc etc ... | ||
| </ | </ | ||