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.47.1.404.ge66fd72e97
10 .TH "GITFORMAT\-SIGNATURE" "5" "2024-12-06" "Git 2\&.47\&.1\&.404\&.ge66fd7" "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\fR \fB\-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:
48 \fBSIGNATURE\-\-\-\-\-\fR
52 \fBSIGNATURE\-\-\-\-\-\fR\&. Or, if gpg is told to produce RFC1991 signatures,
55 \fBMESSAGE\-\-\-\-\-\fR
59 \fBMESSAGE\-\-\-\-\-\fR
66 \fBSIGNATURE\-\-\-\-\-\fR
70 \fBSIGNATURE\-\-\-\-\-\fR
77 \fBMESSAGE\-\-\-\-\-\fR
81 \fBMESSAGE\-\-\-\-\-\fR
84 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\&.
86 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\&.
88 The signed payload and the way the signature is embedded depends on the type of the object resp\&. transaction\&.
113 payload: annotated tag object
124 embedding: append the signature to the unsigned tag object
146 object 04b871796dc0420f8e7561a895b52484b701d51a
149 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
153 signed tag message body
154 \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
157 iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn
158 rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh
159 8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods
160 q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0
161 rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x
162 lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=
164 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
191 gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189
192 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
193 gpg: WARNING: This key is not certified with a trusted signature!
194 gpg: There is no indication that the signature belongs to the owner\&.
195 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
196 object 04b871796dc0420f8e7561a895b52484b701d51a
199 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
203 signed tag message body
208 .SH "COMMIT SIGNATURES"
232 payload: commit object
243 embedding: header entry
245 (content is preceded by a space)
256 example: commit with subject
265 tree eebfed94e75e7760540d1485c740902590a00332
266 parent 04b871796dc0420f8e7561a895b52484b701d51a
267 author A U Thor <author@example\&.com> 1465981137 +0000
268 committer C O Mitter <committer@example\&.com> 1465981137 +0000
269 gpgsig \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
272 iQEcBAABAgAGBQJXYRjRAAoJEGEJLoW3InGJ3IwIAIY4SA6GxY3BjL60YyvsJPh/
273 HRCJwH+w7wt3Yc/9/bW2F+gF72kdHOOs2jfv+OZhq0q4OAN6fvVSczISY/82LpS7
274 DVdMQj2/YcHDT4xrDNBnXnviDO9G7am/9OE77kEbXrp7QPxvhjkicHNwy2rEflAA
275 zn075rtEERDHr8nRYiDh8eVrefSO7D+bdQ7gv+7GsYMsd2auJWi1dHOSfTr9HIF4
276 HJhWXT9d2f8W+diRYXGh4X0wYiGg6na/soXc+vdtDYBzIxanRqjg8jCAeo1eOTk1
277 EdTwhcTZlI0x5pvJ3H0+4hA2jtldVtmPM4OTB0cTrEWBad7XV6YgiyuII73Ve3I=
279 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
283 signed commit message body
303 \fB\-\-show\-signature\fR)
310 gpg: Signature made Wed Jun 15 10:58:57 2016 CEST using RSA key ID B7227189
311 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
312 gpg: WARNING: This key is not certified with a trusted signature!
313 gpg: There is no indication that the signature belongs to the owner\&.
314 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
315 tree eebfed94e75e7760540d1485c740902590a00332
316 parent 04b871796dc0420f8e7561a895b52484b701d51a
317 author A U Thor <author@example\&.com> 1465981137 +0000
318 committer C O Mitter <committer@example\&.com> 1465981137 +0000
322 signed commit message body
327 .SH "MERGETAG SIGNATURES"
351 payload/embedding: the whole signed tag object is embedded into the (merge) commit object as header entry
363 example: merge of the signed tag
372 tree c7b1cff039a93f3600a1d18b82d26688668c7dea
373 parent c33429be94b5f2d3ee9b0adad223f877f174b05d
374 parent 04b871796dc0420f8e7561a895b52484b701d51a
375 author A U Thor <author@example\&.com> 1465982009 +0000
376 committer C O Mitter <committer@example\&.com> 1465982009 +0000
377 mergetag object 04b871796dc0420f8e7561a895b52484b701d51a
380 tagger C O Mitter <committer@example\&.com> 1465981006 +0000
384 signed tag message body
385 \-\-\-\-\-BEGIN PGP SIGNATURE\-\-\-\-\-
388 iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn
389 rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh
390 8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods
391 q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0
392 rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x
393 lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=
395 \-\-\-\-\-END PGP SIGNATURE\-\-\-\-\-
397 Merge tag \*(Aqsignedtag\*(Aq into downstream
401 signed tag message body
403 # gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189
404 # gpg: Good signature from "Eris Discordia <discord@example\&.net>"
405 # gpg: WARNING: This key is not certified with a trusted signature!
406 # gpg: There is no indication that the signature belongs to the owner\&.
407 # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
421 verify with: verification is embedded in merge commit message by default, alternatively with
424 \fB\-\-show\-signature\fR:
431 commit 9863f0c76ff78712b6800e199a46aa56afbcbd49
432 merged tag \*(Aqsignedtag\*(Aq
433 gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189
434 gpg: Good signature from "Eris Discordia <discord@example\&.net>"
435 gpg: WARNING: This key is not certified with a trusted signature!
436 gpg: There is no indication that the signature belongs to the owner\&.
437 Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
438 Merge: c33429b 04b8717
439 Author: A U Thor <author@example\&.com>
440 Date: Wed Jun 15 09:13:29 2016 +0000
442 Merge tag \*(Aqsignedtag\*(Aq into downstream
446 signed tag message body
448 # gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189
449 # gpg: Good signature from "Eris Discordia <discord@example\&.net>"
450 # gpg: WARNING: This key is not certified with a trusted signature!
451 # gpg: There is no indication that the signature belongs to the owner\&.
452 # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA 29A4 6109 2E85 B722 7189
459 Part of the \fBgit\fR(1) suite