Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion docs/admin/config/batch_changes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,42 @@ GitHub | API call | ✓ | ✓ |
GitLab | Changeset property | ✓ | ✓ |
Gerrit | API call | ✗ | ✓ | Requires ["delete own changes" permission](https://gerrit-review.googlesource.com/Documentation/access-control.html#category_delete_own_changes) at minimum

## Commit signing for GitHub
## Commit signing

Batch Changes supports Commit Signing with GitHub Apps since version 5.1 and with SSH Keys since version 6.2.

### Commit signing with SSH Keys (GitLab and GitHub)

<Callout type="note"> This feature is supported only in Sourcegraph versions 6.2 or more.</Callout>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: How about "or later" instead of "or more"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, after finishing reading this diff I see we have "or more" in other parts of the docs as well. I'm curious what Maedah's stance is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaedahBatool do we have a standard here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @bahrmichael we have the following formats:

  • v6.2 or more
  • v6.2+


Commit signing with SSH keys can only be used in combination with a personal access token.

Sourcegraph can be configured to sign commits using SSH keys, both with user and site admin credentials.

To enable **commit signing for your Batch Changes user**, navigate to **Settings > Batch Changes** and click on "Add credentials" for a GitHub or GitLab code host.

![List of code hosts with an arrow pointing to add credential](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/code_host_add_credential.png)

If you already have a credential for the given code host, you have to remove it first.

Enter your personal access token, and check the box "Sign commits on this code host". This will add an additional step to the setup flow. Click on "Next" and wait for Batch Changes to verify the access token.

![The modal for adding a credential with an arrow pointing to the checkbox for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_checkbox.png)

Once the credential is added, you can copy the public SSH key that Batch Changes will use to sign commits. You can view the public key at any time by clicking on "View Credentials".

![The modal displays the ssh key used for commit signing](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/setup_commit_signing_view_ssh_key.png)

Add this public SSH key to your [GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) or [GitLab](https://docs.gitlab.com/user/ssh/#add-an-ssh-key-to-your-gitlab-account) account.
Make sure you add it as a signing key.

![Add the key to your code host as a signing key](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/github_add_signing_key.png)

To enable **commit signing as a site admin**, navigate to **Site Admin > Section: Batch Changes > Settings** and click on "Add credentials" for a GitHub or GitLab code host. The rest of the setup is the same as above.

![Site admin settings for batch changes](https://storage.googleapis.com/sourcegraph-assets/docs/images/batch_changes/2025/batch_changes_site_admin_settings.png)

### Commit signing with GitHub Apps

<Callout type="note"> The feature is currently in Beta stage and supported on Sourcegraph versions 5.1 or more.</Callout>

Expand Down