about summary refs log tree commit diff stats
path: root/cgitrc.5.txt
diff options
context:
space:
mode:
authorJason A. Donenfeld2018-07-05 02:38:33 +0200
committerJason A. Donenfeld2018-07-05 02:40:48 +0200
commit22583c4992852fff08559c35fde7bf6f673d1644 (patch)
tree269818f1b13ea032e246f0cd1cb932770d2ed5d3 /cgitrc.5.txt
parentFix gcc 8.1.1 compiler warnings (diff)
downloadcgit-22583c4992852fff08559c35fde7bf6f673d1644.tar.gz
cgit-22583c4992852fff08559c35fde7bf6f673d1644.zip
cgitrc.5: add local tar signature example
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt19
1 files changed, 15 insertions, 4 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 6b4efa2..34b351b 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt
@@ -775,14 +775,25 @@ through use of git notes. For example, the following command may be used to
775add a signature to a .tar.xz archive: 775add a signature to a .tar.xz archive:
776 776
777 git notes --ref=refs/notes/signatures/tar.xz add -C "$( 777 git notes --ref=refs/notes/signatures/tar.xz add -C "$(
778 gpg --output - --armor --detach-sign cgit-1.1.tar.xz | 778 gpg --output - --armor --detach-sign cgit-1.1.tar.xz |
779 git hash-object -w --stdin 779 git hash-object -w --stdin
780 )" v1.1 780 )" v1.1
781 781
782If it is instead desirable to attach a signature of the underlying .tar, this 782If it is instead desirable to attach a signature of the underlying .tar, this
783will be linked, as a special case, beside a .tar.* link that does not have its 783will be linked, as a special case, beside a .tar.* link that does not have its
784own signature. 784own signature. For example, a signature of a tarball of the latest tag might
785 785be added with a similar command:
786
787 tag="$(git describe --abbrev=0)"
788 git notes --ref=refs/notes/signatures/tar add -C "$(
789 git archive --format tar --prefix "cgit-${tag#v}/" "$tag" |
790 gpg --output - --armor --detach-sign |
791 git hash-object -w --stdin
792 )" "$tag"
793
794Since git-archive(1) is expected to produce stable output between versions,
795this allows one to generate a long-term signature of the contents of a given
796tag.
786 797
787EXAMPLE CGITRC FILE 798EXAMPLE CGITRC FILE
788------------------- 799-------------------