In the book Pro Git, Tagging Your Releases:
It shows a way to collect the public key into a blob in git,so users who sync it can add that public key and to verify the signed tag.
Is this way actually safe? Someone can change the public key blob and redo the signing.I think we should get the public key from a separate and authorized way, right?
The commands in the book are pasted as following:
$ git tag -s v1.5 -m 'my signed 1.5 tag'
You need a passphrase to unlock the secret key for
user: "Scott Chacon <schacon@gmail.com>"
1024-bit DSA key, ID F721C45A, created 2009-02-09
$ gpg --list-keys
/Users/schacon/.gnupg/pubring.gpg
---------------------------------
pub 1024D/F721C45A 2009-02-09 [expires: 2010-02-09]
uid Scott Chacon <schacon@gmail.com>
sub 2048g/45D02282 2009-02-09 [expires: 2010-02-09]
$ gpg -a --export F721C45A | git hash-object -w --stdin
659ef797d181633c87ec71ac3f9ba29fe5775b92
$ git tag -a maintainer-pgp-pub 659ef797d181633c87ec71ac3f9ba29fe5775b92
$ git show maintainer-pgp-pub | gpg --import