git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Signinig a commit with multiple signatures

From
Jason Pyeron <jpyeron@pdinc.us>
Date
Aug 17, 2014, 13:30 UTC
Message-ID
<DED50992A39F4A07ACD997A65602991E@black>
In-Reply-To
<20140817075250.GH23808@peff.net>
I am working on an open source project right now where we are looking to enforce a N of M audit approval process. It turns out that git supports verifying multiple signatures because gpg supports signature merging.
My question is how can this workflow best be added into git and if not added atleast supported.
Here are the manual procedures (scripts are in the bundle too):
Show 19 quoted lines
> Procedures:
> 
> 1. Identify a normal commit.
> 2. create a new commit file as:
> parent commit-id-of-step-1
> tree tree-id-from-git-cat-file-commit-commit-id-of-step-1
> author CipherShed Security Team <security@ciphershed.org> 
> timestamp timezone
> committer Actual Person <username@ciphershed.org> timestamp timezone
> gpgsig output-from-merge-sig-tool [1]
>  more-output
>  more-output
> 
> Comments for this commit
> ...
> ...
> 
> 3. run ruby script [2] to add commit to git db
> 4. git update-ref refs/heads/BRANCH-NAME new-commit-id
To do this most properly I feel like there needs to be a way to "share" the repository state and intterrupt the commit process.
Comments?
1: 
$ cat merge-multisigs.sh
#!/bin/bash
(
 for i in "$@"
 do
  gpg --dearmor < "$i"
 done
) | gpg --enarmor

2: $ cat write-commit.ruby #!/usr/bin/irb require 'fileutils' file = File.open(ARGV[0], "rb") content = file.read header = "commit #{content.length}\0" store = header + content require 'digest/sha1' sha1 = Digest::SHA1.hexdigest(store) require 'zlib' zlib_content = Zlib::Deflate.deflate(store) path = '.git/objects/' + sha1[0,2] + '/' + sha1[2,38] FileUtils.mkdir_p(File.dirname(path)) File.open(path, 'w') { |f| f.write zlib_content }

P.S. This was inspired by actual events and the parent thread.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.
Previous: Jeff KingNext: Jeff King
Message 7 of 10 in “Sharing merge conflict resolution between multiple developers”
  1. Chris PackhamAug 11, 2014
  2. Junio C HamanoAug 11, 2014
  3. Chris PackhamAug 11, 2014
  4. Junio C HamanoAug 12, 2014
  5. Nico WilliamsAug 11, 2014
  6. Jeff KingAug 17, 2014
  7. Signinig a commit with multiple signaturesJason Pyeron, Aug 17, 2014
  8. Jeff KingAug 19, 2014
  9. Jason PyeronAug 19, 2014
  10. Christian CouderAug 11, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.