From c87b0c31e11b6a1f45c33dd2e746b914852d92f2 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Sat, 31 Oct 2026 14:57:01 +1100 Subject: [PATCH] chore(tools): sign cloud environment commits with an SSH key --- tools/cloud-setup.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/cloud-setup.sh b/tools/cloud-setup.sh index 4049bd13c..614a5e164 100755 --- a/tools/cloud-setup.sh +++ b/tools/cloud-setup.sh @@ -63,6 +63,16 @@ s.attribution = { ...s.attribution, commit: "", pr: "", sessionUrl: false }; fs.writeFileSync(p, JSON.stringify(s, null, 2) + "\n"); ' "$settings" +# Sign commits with the environment's own SSH key so Gitea and GitHub show +# them as verified. +mkdir -p "$HOME/.ssh" +echo "$SIGNING_KEY_B64" | base64 -d >"$HOME/.ssh/signing" +chmod 600 "$HOME/.ssh/signing" +git config --global gpg.format ssh +git config --global user.signingkey "$HOME/.ssh/signing" +git config --global commit.gpgsign true +git config --global user.email sam@catlow.tech + # The session shell is not a login shell, so profile.d is never read. Link the # tools onto the default PATH instead. $SUDO ln -sf /usr/local/go/bin/* "$GOBIN"/* /usr/local/bin/