Skip to main content
Git creates each commit signature. Code Storage checks the signature when a verify-sig ref policy applies to an update. The Signing Keys page stores public keys for your organization. A registered key does not enable a check by itself.

How the parts work together

Require signed commits

1. Create a signed commit

Configure Git for OpenPGP or SSH signatures. Then use -S to sign a commit.

2. Register the public key

Open Signing Keys in the dashboard. Select New signing key, then paste an OpenPGP or SSH public key. Signing keys belong to the organization. Code Storage reads the current key list for each ref update.

3. Add verify-sig to a ref policy

This policy requires a registered signature on each commit that enters main.
Use ops: ['verify-sig', 'no-force-push'] to require signatures and reject a history rewrite. See Ref Policies for rule order, patterns, and ephemeral refs.

4. Push the signed commit

Use the URL with this policy as a Git remote. Code Storage rejects the complete update if one introduced commit fails the check.

What Code Storage checks

Code Storage checks commits that the update introduces to the matched ref.
  • For a new ref, Code Storage checks every commit that the new tip can reach.
  • For a ref that already exists, Code Storage checks commits that its new tip can reach but its prior tip cannot reach.
  • Code Storage checks a commit again when it first enters another protected ref.
Code Storage rejects the update in these cases:
  • A commit has no signature.
  • No registered key matches the signature.
  • The signature data is invalid or uses an unsupported format.
  • The organization has no registered signing keys.
A ref deletion introduces no commits. The verify-sig operation does not reject that deletion.

Server-created commits

Do not target a verify-sig ref with createCommit, createCommitFromDiff, or merge. These methods create unsigned commits.
Use a signed Git push when a ref requires a signature. Code Storage does not create a signature for a server-created commit.

Read signature data

You can read signature data without a ref policy. getCommit() returns an armored signature and the exact payload for a signed commit.
This method does not return a trust result. Check the pair with an OpenPGP or SSH library. See the getCommit() reference for the complete response.

Remove a key

Delete a key. Code Storage rejects a signature from that key on the next ref update. The deletion does not change stored commits or their signatures.