answered from live GitHub & Hugging Face data

How do I create signed commits for AI coding agents like Copilot to ensure accountability?

Verdict: You do not need to sign Copilot's commits. GitHub already signs commits from Copilot cloud agent. For other agents that run git on your machine, you must set up signing yourself, and a dedicated key per agent is the right model.

1. Copilot cloud agent: already signed

2. Other local agents: sign with a dedicated key

Do not reuse your personal signing key for an agent. A signature from your key makes the agent's work look like yours. Use these steps:

  1. Create an SSH or GPG key for the agent. SSH is the simplest option. SSH signing needs Git 2.34 or later (About commit signature verification).
  2. Add the public key to the GitHub account as a signing key. There is no limit on the number of signing keys (About commit signature verification).
  3. Tell Git about the key. Follow Telling Git about your signing key.
  4. Turn on signing for the agent's repository. Run git config commit.gpgsign true (Signing commits).

Caution: the signature proves which key signed the commit. It does not prove which agent or human started the run.

3. GitHub App: bot-verified commits

Organizations and GitHub Apps that require commit signing can use bots to sign commits. GitHub verifies these signatures only if:

A local git commit -S followed by git push does not meet these conditions. Use the App route if you need bot-verified commits from an agent.

4. Enforce signing on the branch

5. Key rotation does not remove past verification

Verified commits keep their status after a key is revoked or expires. GitHub stores a verification record when the commit is first verified (About commit signature verification). Plan key rotation with this in mind.

How they relate

Copilot cloud agent signs with GitHub's own identity. Local agents sign with a key you own. A GitHub App sits between them. It can sign as a bot, but only through the authenticated API path.

Recommendation: Trust Copilot cloud agent's built-in signing for its own commits. For local agents, create one signing key per agent and require signed commits on protected branches.

If you run several local agents, you also need to trace each commit to one agent run and one accountable human. githug does this. Each agent gets its own key, which mints GitHub tokens that last one hour and work on one repo. Agent commits are authored as the agent and carry trailers naming the accountable human, the agent, and the run. The hug CLI (hug init --repo owner/repo) sets this up for Claude Code, Codex, Cursor, or any agent that runs git. It is free during the beta.

docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verificationdocs.github.com/en/copilot/concepts/security-governance-and-network-settings/risks-and-mitigationsdocs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/manage-and-track-agentsdocs.github.com/en/authentication/managing-commit-signature-verification/signing-commitsdocs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches
Answered live from GitHub & Hugging Face · anthropic/claude-haiku-5.5 · 10/21/2026

Ask your own open-source question →