2 .\" Title: gitformat-signature
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
7 .\" Source: Git 2.46.1.530.g3969d78396
10 .TH "GITFORMAT\-SIGNATURE" "5" "2024-09-16" "Git 2\&.46\&.1\&.530\&.g3969d7" "Git Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 gitformat-signature \- Git cryptographic signature formats
35 <[tag|commit] object header(s)>
36 <over\-the\-wire protocol>
40 Git uses cryptographic signatures in various places, currently objects (tags, commits, mergetags) and transactions (pushes)\&. In every case, the command which is about to create an object or transaction determines a payload from that, calls an external program to obtain a detached signature for the payload (\fBgpg \-bsa\fR in the case of PGP signatures), and embeds the signature into the object or transaction\&.
42 Signatures begin with an "ASCII Armor" header line and end with a tail line, which differ depending on signature type (as selected by \fBgpg\&.format\fR, see \fBgit-config\fR(1))\&. These are, for \fBgpg\&.format\fR values:
46 \fB\-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-\fR
48 \fB\-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-\fR\&. Or, if gpg is told to produce RFC1991 signatures,
49 \fB\-\-\-\-\-BEGIN PGP MESSAGE\-\-\-\-\-\fR
51 \fB\-\-\-\-\-END PGP MESSAGE\-\-\-\-\-\fR
56 \fB\-\-\-\-\-BEGIN SSH SIGNATURE\-\-\-\-\-\fR
58 \fB\-\-\-\-\-END SSH SIGNATURE\-\-\-\-\-\fR
63 \fB\-\-\-\-\-BEGIN SIGNED MESSAGE\-\-\-\-\-\fR
65 \fB\-\-\-\-\-END SIGNED MESSAGE\-\-\-\-\-\fR
68 Signatures sometimes appear as a part of the normal payload (e\&.g\&. a signed tag has the signature block appended after the payload that the signature applies to), and sometimes appear in the value of an object header (e\&.g\&. a merge commit that merged a signed tag would have the entire tag contents on its "mergetag" header)\&. In the case of the latter, the usual multi\-line formatting rule for object headers applies\&. I\&.e\&. the second and subsequent lines are prefixed with a SP to signal that the line is continued from the previous line\&.
70 This is even true for an originally empty line\&. In the following examples, the end of line that ends with a whitespace letter is highlighted with a \fB$\fR sign; if you are trying to recreate these example by hand, do not cut and paste them\(em\:they are there primarily to highlight extra whitespace at the end of some lines\&.
72 The signed payload and the way the signature is embedded depends on the type of the object resp\&. transaction\&.
95 payload: annotated tag object
106 embedding: append the signature to the unsigned tag object
127 object 04b871796dc0420f8e7561a895b52484b701d51a
130 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
134 signed tag message body
135 \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
138 iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn
139 rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh
140 8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods
141 q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0
142 rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x
143 lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=
145 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
160 \fBgit verify\-tag [\-v]\fR
169 gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189
170 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
171 gpg: WARNING: This key is not certified with a trusted signature!
172 gpg: There is no indication that the signature belongs to the owner\&.
173 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
174 object 04b871796dc0420f8e7561a895b52484b701d51a
177 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
181 signed tag message body
186 .SH "COMMIT SIGNATURES"
208 payload: commit object
219 embedding: header entry
221 (content is preceded by a space)
232 example: commit with subject
240 tree eebfed94e75e7760540d1485c740902590a00332
241 parent 04b871796dc0420f8e7561a895b52484b701d51a
242 author A U Thor <author@example\&.com> 1465981137 +0000
243 committer C O Mitter <committer@example\&.com> 1465981137 +0000
244 gpgsig \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
247 iQEcBAABAgAGBQJXYRjRAAoJEGEJLoW3InGJ3IwIAIY4SA6GxY3BjL60YyvsJPh/
248 HRCJwH+w7wt3Yc/9/bW2F+gF72kdHOOs2jfv+OZhq0q4OAN6fvVSczISY/82LpS7
249 DVdMQj2/YcHDT4xrDNBnXnviDO9G7am/9OE77kEbXrp7QPxvhjkicHNwy2rEflAA
250 zn075rtEERDHr8nRYiDh8eVrefSO7D+bdQ7gv+7GsYMsd2auJWi1dHOSfTr9HIF4
251 HJhWXT9d2f8W+diRYXGh4X0wYiGg6na/soXc+vdtDYBzIxanRqjg8jCAeo1eOTk1
252 EdTwhcTZlI0x5pvJ3H0+4hA2jtldVtmPM4OTB0cTrEWBad7XV6YgiyuII73Ve3I=
254 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
258 signed commit message body
273 \fBgit verify\-commit [\-v]\fR
275 \fBgit show \-\-show\-signature\fR)
282 gpg: Signature made Wed Jun 15 10:58:57 2016 CEST using RSA key ID B7227189
283 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
284 gpg: WARNING: This key is not certified with a trusted signature!
285 gpg: There is no indication that the signature belongs to the owner\&.
286 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
287 tree eebfed94e75e7760540d1485c740902590a00332
288 parent 04b871796dc0420f8e7561a895b52484b701d51a
289 author A U Thor <author@example\&.com> 1465981137 +0000
290 committer C O Mitter <committer@example\&.com> 1465981137 +0000
294 signed commit message body
299 .SH "MERGETAG SIGNATURES"
322 payload/embedding: the whole signed tag object is embedded into the (merge) commit object as header entry
334 example: merge of the signed tag
343 tree c7b1cff039a93f3600a1d18b82d26688668c7dea
344 parent c33429be94b5f2d3ee9b0adad223f877f174b05d
345 parent 04b871796dc0420f8e7561a895b52484b701d51a
346 author A U Thor <author@example\&.com> 1465982009 +0000
347 committer C O Mitter <committer@example\&.com> 1465982009 +0000
348 mergetag object 04b871796dc0420f8e7561a895b52484b701d51a
351 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
355 signed tag message body
356 \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
359 iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn
360 rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh
361 8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods
362 q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0
363 rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x
364 lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=
366 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
368 Merge tag \*(Aqsignedtag\*(Aq into downstream
372 signed tag message body
374 # gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189
375 # gpg: Good signature from "Eris Discordia <discord@example\&.net>"
376 # gpg: WARNING: This key is not certified with a trusted signature!
377 # gpg: There is no indication that the signature belongs to the owner\&.
378 # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
392 verify with: verification is embedded in merge commit message by default, alternatively with
393 \fBgit show \-\-show\-signature\fR:
400 commit 9863f0c76ff78712b6800e199a46aa56afbcbd49
401 merged tag \*(Aqsignedtag\*(Aq
402 gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189
403 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
404 gpg: WARNING: This key is not certified with a trusted signature!
405 gpg: There is no indication that the signature belongs to the owner\&.
406 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
407 Merge: c33429b 04b8717
408 Author: A U Thor <author@example\&.com>
409 Date: Wed Jun 15 09:13:29 2016 +0000
411 Merge tag \*(Aqsignedtag\*(Aq into downstream
415 signed tag message body
417 # gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189
418 # gpg: Good signature from "Eris Discordia <discord@example\&.net>"
419 # gpg: WARNING: This key is not certified with a trusted signature!
420 # gpg: There is no indication that the signature belongs to the owner\&.
421 # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
428 Part of the \fBgit\fR(1) suite