{"thread":{"id":"55263","subject":"Cross-signing commits","startedAt":"2021-03-05T16:48:21Z","lastAt":"2021-03-05T23:46:16Z","messageCount":5,"participants":["Soni L.","brian m. carlson","Randall S. Becker"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"418319","messageId":"355bb5d1-f661-4ac2-d536-d1c56ec5e408@gmail.com","threadId":"55263","inReplyTo":null,"subject":"Cross-signing commits","fromName":"Soni L.","fromEmail":"fakedme+git@gmail.com","sentAt":"2021-03-05T16:47:14Z","receivedAt":"2021-03-05T16:48:21Z","isPatch":false,"sender":{"key":"fakedme+git@gmail.com","avatar":null},"body":"We have a somewhat unusual use-case where we need to cross-sign commits. \nIs there any way to do this in git? As far as one can tell, attempting \nto cross-sign a commit would cause its hash to change, and creating a \nsigned child commit would break fast-forward merges. So these are a no-go.\n\nThanks.\n\n"},{"id":"418344","messageId":"YEKmVWHJchUhxZmn@camp.crustytoothpaste.net","threadId":"55263","inReplyTo":"355bb5d1-f661-4ac2-d536-d1c56ec5e408@gmail.com","subject":"Re: Cross-signing commits","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2021-03-05T21:44:53Z","receivedAt":"2021-03-05T21:45:45Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2021-03-05 at 16:47:14, Soni L. wrote:\n> We have a somewhat unusual use-case where we need to cross-sign commits. Is\n> there any way to do this in git? As far as one can tell, attempting to\n> cross-sign a commit would cause its hash to change, and creating a signed\n> child commit would break fast-forward merges. So these are a no-go.\n\nCan you explain what you mean by \"cross-signing\"?  Are you proposing a\nsituation where two parties sign the same commit?\n-- \nbrian m. carlson (he/him or they/them)\nHouston, Texas, US\n"},{"id":"418347","messageId":"537258e7-fcf4-814c-c7c1-95c8d525f34a@gmail.com","threadId":"55263","inReplyTo":"YEKmVWHJchUhxZmn@camp.crustytoothpaste.net","subject":"Re: Cross-signing commits","fromName":"Soni L.","fromEmail":"fakedme+git@gmail.com","sentAt":"2021-03-05T21:53:14Z","receivedAt":"2021-03-05T21:54:01Z","isPatch":false,"sender":{"key":"fakedme+git@gmail.com","avatar":null},"body":"\n\nOn 2021-03-05 6:44 p.m., brian m. carlson wrote:\n> On 2021-03-05 at 16:47:14, Soni L. wrote:\n> > We have a somewhat unusual use-case where we need to cross-sign commits. Is\n> > there any way to do this in git? As far as one can tell, attempting to\n> > cross-sign a commit would cause its hash to change, and creating a signed\n> > child commit would break fast-forward merges. So these are a no-go.\n>\n> Can you explain what you mean by \"cross-signing\"?  Are you proposing a\n> situation where two parties sign the same commit?\n\nYep. See, the repos enforce signing, but they can also be forks. If \nsomeone wants to track upstream in one of their branches they just \ncan't. Would be cool if they could just say they trust the commits by \nsigning the relevant commits with their own key instead - on the \nassumption that they actually reviewed said commits.\n"},{"id":"418349","messageId":"YEKpoiy//SR5Nt3q@camp.crustytoothpaste.net","threadId":"55263","inReplyTo":"537258e7-fcf4-814c-c7c1-95c8d525f34a@gmail.com","subject":"Re: Cross-signing commits","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2021-03-05T21:58:58Z","receivedAt":"2021-03-05T22:00:04Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2021-03-05 at 21:53:14, Soni L. wrote:\n> \n> \n> On 2021-03-05 6:44 p.m., brian m. carlson wrote:\n> > Can you explain what you mean by \"cross-signing\"?  Are you proposing a\n> > situation where two parties sign the same commit?\n> \n> Yep. See, the repos enforce signing, but they can also be forks. If someone\n> wants to track upstream in one of their branches they just can't. Would be\n> cool if they could just say they trust the commits by signing the relevant\n> commits with their own key instead - on the assumption that they actually\n> reviewed said commits.\n\nGit doesn't natively support having multiple signatures in a commit,\nalthough it is of course possible to do, since OpenPGP supports it.\nHowever, as you noted, changing the signature changes the object ID, so\nif you re-sign a commit for any reason, that changes the commit ID.\nThere isn't any way around this at all; that's just how it works.\n\nSo you can either re-sign or have an unchanged commit ID, but not both\nat the same time.\n\nYou can use additional empty signed commits or signed tags, or you can\nuse some sort of external system that keeps track of additional\nsignatures or approvals if you want.\n-- \nbrian m. carlson (he/him or they/them)\nHouston, Texas, US\n"},{"id":"418359","messageId":"022c01d71219$a18eed60$e4acc820$@nexbridge.com","threadId":"55263","inReplyTo":"YEKpoiy//SR5Nt3q@camp.crustytoothpaste.net","subject":"RE: Cross-signing commits","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-03-05T23:45:26Z","receivedAt":"2021-03-05T23:46:16Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On March 5, 2021 4:59 PM, brian m. carlson wrote:\n> On 2021-03-05 at 21:53:14, Soni L. wrote:\n> > On 2021-03-05 6:44 p.m., brian m. carlson wrote:\n> > > Can you explain what you mean by \"cross-signing\"?  Are you proposing\n> > > a situation where two parties sign the same commit?\n> >\n> > Yep. See, the repos enforce signing, but they can also be forks. If\n> > someone wants to track upstream in one of their branches they just\n> > can't. Would be cool if they could just say they trust the commits by\n> > signing the relevant commits with their own key instead - on the\n> > assumption that they actually reviewed said commits.\n> \n> Git doesn't natively support having multiple signatures in a commit, although\n> it is of course possible to do, since OpenPGP supports it.\n> However, as you noted, changing the signature changes the object ID, so if\n> you re-sign a commit for any reason, that changes the commit ID.\n> There isn't any way around this at all; that's just how it works.\n> \n> So you can either re-sign or have an unchanged commit ID, but not both at\n> the same time.\n> \n> You can use additional empty signed commits or signed tags, or you can use\n> some sort of external system that keeps track of additional signatures or\n> approvals if you want.\n\nIf your workflow requires multiple signatures on the same commit, you have options:\n\n1. Use signed tags. So you can put multiple OpenPGP signed tags on a commit, representing each person's individual sign-off. Tags would be my preference as they show up explicitly in the git log --decorate output. Of course you will need a naming standard for this class of tags.\n2. Create empty child commits with the desired commit as parent, and each person can sign their own commit - not really a great idea as history gets messy and potentially confusing.\n\nRegards,\nRandall\n\n-- Brief whoami:\nNonStop developer since approximately 211288444200000000\nUNIX developer since approximately 421664400\n-- In my real life, I talk too much.\n\n\n\n"}]}