Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
79 changes: 10 additions & 69 deletions docs/admin/code_hosts/aws_codecommit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,86 +34,27 @@ AWS CodeCommit connections support the following configuration options, which ar

{/* SCHEMA_SYNC_START: admin/code_hosts/aws_codecommit.schema.json */}
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
{/* Last updated: 2025-07-01T21:34:12Z via sourcegraph/sourcegraph@v6.5.1211 */}
```json
{
// The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy.
"accessKeyID": null,

// A list of repositories to never mirror from AWS CodeCommit.
//
// Supports excluding by name ({"name": "git-codecommit.us-west-1.amazonaws.com/repo-name"}) or by ARN ({"id": "arn:aws:codecommit:us-west-1:999999999999:name"}).
"exclude": null,
// Other example values:
// - [
// {
// "name": "go-monorepo"
// },
// {
// "id": "f001337a-3450-46fd-b7d2-650c0EXAMPLE"
// }
// ]
// - [
// {
// "name": "go-monorepo"
// },
// {
// "name": "go-client"
// }
// ]

// The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.
//
// See the AWS CodeCommit documentation on Git credentials for CodeCommit: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit.
// For detailed instructions on how to create the credentials in IAM, see this page: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html
"gitCredentials": null,

// Deprecated and ignored field which will be removed entirely in the next release. AWS CodeCommit repositories can no longer be enabled or disabled explicitly. Configure which repositories should not be mirrored via "exclude" instead.
"gitCredentials": {
"password": null,
"username": null
},
"gitSSHCipher": null,
"gitSSHCredential": null,
"gitSSHKeyID": null,
"gitURLType": "http",
"initialRepositoryEnablement": false,

// The AWS region in which to access AWS CodeCommit. See the list of supported regions at https://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-git.
"maxDeletions": 0,
"region": "us-east-1",

// The pattern used to generate a the corresponding Sourcegraph repository name for an AWS CodeCommit repository. In the pattern, the variable "{name}" is replaced with the repository's name.
//
// For example, if your Sourcegraph instance is at https://src.example.com, then a repositoryPathPattern of "awsrepos/{name}" would mean that a AWS CodeCommit repository named "myrepo" is available on Sourcegraph at https://src.example.com/awsrepos/myrepo.
//
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
"repositoryPathPattern": "{name}",
// Other example values:
// - "git-codecommit.us-west-1.amazonaws.com/{name}"
// - "git-codecommit.eu-central-1.amazonaws.com/{name}"

// The AWS secret access key (that corresponds to the AWS access key ID set in `accessKeyID`).
"secretAccessKey": null
}
```

## Setup steps for SSH connections to AWS CodeCommit repositories

To add CodeCommit repositories in Docker Container:

1. Generate a public/private rsa key pair that does not require passphrase as listed in the [Step 3.1 of the AWS SSH setup guide](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html#setting-up-ssh-unixes-keys). Sourcegraph does not work with the key pair that requires passphrase.
1. Follow the rest of the steps detailed in the [AWS SSH setup guide](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html) to make sure you can connect to the code host locally.
1. Confirm you have the connection by running the following ssh command locally: `ssh git-codecommit.us-west-1.amazonaws.com` (Update link with your server region)
1. Confirm you can clone the repository locally.

### Configuring SSH credentials in the Web UI

```json
{
"gitURLType": "ssh",
"gitSSHKeyID": "<SSH key ID>",
"gitSSHCredential": {
// make sure the key is base64 encoded
// $ cat ~/.ssh/id_rsa | base64
"privateKey": "<base64 encoded of the SSH private key>",
"passphrase": "<passphrase if applicable, omit if none is needed>"
}
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/aws_codecommit.schema.json */}

## Configuration Notes

### Git Credentials Requirement
Expand Down
61 changes: 11 additions & 50 deletions docs/admin/code_hosts/azuredevops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,68 +67,29 @@ Azure DevOps connections support the following configuration options, which are

{/* SCHEMA_SYNC_START: admin/code_hosts/azuredevops.schema.json */}
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
{/* Last updated: 2025-07-01T21:34:11Z via sourcegraph/sourcegraph@v6.5.1211 */}
```json
{
// A flag to enforce Azure DevOps repository access permissions
"enforcePermissions": false,

// A list of repositories to never mirror from Azure DevOps Services.
"exclude": null,
// Other example values:
// - [
// {
// "name": "myorg/myproject/myrepo"
// }
// ]
// - [
// {
// "name": "myorg/myproject/myrepo"
// },
// {
// "name": "myorg/myproject/myotherrepo"
// },
// {
// "pattern": "^topsecretproject/.*"
// }
// ]

// The type of Git URLs to use for cloning and fetching Git repositories.
//
// If "http", Sourcegraph will access repositories using Git URLs of the form http(s)://dev.azure.com/myrepo.git.
//
// If "ssh", Sourcegraph will access repositories using Git URLs of the form git@ssh.dev.azure.com:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
"gitSSHCipher": null,
"gitSSHCredential": null,
"gitURLType": "http",

// An array of organization names identifying Azure DevOps organizations whose repositories should be mirrored on Sourcegraph.
"maxDeletions": 0,
"orgs": null,
// Other example values:
// - ["name"]
// - [
// "kubernetes",
// "golang",
// "facebook"
// ]

// An array of projects "org/project" strings specifying which Azure DevOps projects' repositories should be mirrored on Sourcegraph.
"projects": null,
// Other example values:
// - ["org/project"]

// The Personal Access Token associated with the Azure DevOps username used for authentication.
"rateLimit": {
"enabled": false,
"requestsPerHour": 0
},
"repositoryPathPattern": "{host}/{orgName}/{projectName}/{repositoryName}",
"token": null,

// URL for Azure DevOps Services, set to https://dev.azure.com.
"url": null,
// Other example values:
// - "https://dev.azure.com"

// A username for authentication with the Azure DevOps code host.
"username": null
"username": null,
"windowsPassword": null
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/azuredevops.schema.json */}

## Configuration Notes

### Token Requirements
Expand Down
79 changes: 8 additions & 71 deletions docs/admin/code_hosts/bitbucket_cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,96 +118,33 @@ Bitbucket Cloud connections support the following configuration options, which a

{/* SCHEMA_SYNC_START: admin/code_hosts/bitbucket_cloud.schema.json */}
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
{/* Last updated: Manual setup - will be automated via sourcegraph/sourcegraph releases */}
{/* Last updated: 2025-07-01T21:34:10Z via sourcegraph/sourcegraph@v6.5.1211 */}
```json
{
// The workspace access token to use when authenticating with Bitbucket Cloud.
"accessToken": null,

// The API URL of Bitbucket Cloud, such as https://api.bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.
"apiURL": null,
// Other example values:
// - "https://api.bitbucket.org"

// The app password to use when authenticating to the Bitbucket Cloud. Also set the corresponding "username" field.
"appPassword": null,

// If non-null, enforces Bitbucket Cloud repository permissions. This requires that there is an item in the [site configuration json](https://sourcegraph.com/docs/admin/config/site_config#auth-providers) `auth.providers` field, of type "bitbucketcloud" with the same `url` field as specified in this `BitbucketCloudConnection`.
"authorization": null,

// A list of repositories to never mirror from Bitbucket Cloud. Takes precedence over "teams" configuration.
//
// Supports excluding by name ({"name": "myorg/myrepo"}) or by UUID ({"uuid": "{fceb73c7-cef6-4abe-956d-e471281126bd}"}).
"authorization": {
"identityProvider": null
},
"exclude": null,
// Other example values:
// - [
// {
// "name": "myorg/myrepo"
// },
// {
// "uuid": "{fceb73c7-cef6-4abe-956d-e471281126bc}"
// }
// ]
// - [
// {
// "name": "myorg/myrepo"
// },
// {
// "name": "myorg/myotherrepo"
// },
// {
// "pattern": "^topsecretproject/.*"
// }
// ]

// The type of Git URLs to use for cloning and fetching Git repositories on this Bitbucket Cloud.
//
// If "http", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form https://bitbucket.org/myteam/myproject.git.
//
// If "ssh", Sourcegraph will access Bitbucket Cloud repositories using Git URLs of the form git@bitbucket.org:myteam/myproject.git. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth#repositories-that-need-http-s-or-ssh-authentication.
"gitSSHCipher": null,
"gitSSHCredential": null,
"gitURLType": "http",
// Other example values:
// - "ssh"

// Rate limit applied when making background API requests to Bitbucket Cloud.
"maxDeletions": 0,
"rateLimit": {
"enabled": true,
"requestsPerHour": 7200
},

// The pattern used to generate the corresponding Sourcegraph repository name for a Bitbucket Cloud repository.
//
// - "{host}" is replaced with the Bitbucket Cloud URL's host (such as bitbucket.org), and "{nameWithOwner}" is replaced with the Bitbucket Cloud repository's "owner/path" (such as "myorg/myrepo").
//
// For example, if your Bitbucket Cloud is https://bitbucket.org and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{nameWithOwner}" would mean that a Bitbucket Cloud repository at https://bitbucket.org/alice/my-repo is available on Sourcegraph at https://src.example.com/bitbucket.org/alice/my-repo.
//
// It is important that the Sourcegraph repository name generated with this pattern be unique to this code host. If different code hosts generate repository names that collide, Sourcegraph's behavior is undefined.
"repos": null,
"repositoryPathPattern": "{host}/{nameWithOwner}",

// An array of team names identifying Bitbucket Cloud teams whose repositories should be mirrored on Sourcegraph.
"teams": null,
// Other example values:
// - ["name"]
// - [
// "kubernetes",
// "golang",
// "facebook"
// ]

// URL of Bitbucket Cloud, such as https://bitbucket.org. Generally, admin should not modify the value of this option because Bitbucket Cloud is a public hosting platform.
"url": null,
// Other example values:
// - "https://bitbucket.org"

// The username to use when authenticating to the Bitbucket Cloud. Also set the corresponding "appPassword" field.
"username": null,

// A shared secret used to authenticate incoming webhooks (minimum 12 characters).
"webhookSecret": null
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/bitbucket_cloud.schema.json */}

## Configuration Notes

Bitbucket Cloud connections provide streamlined configuration for cloud-hosted repositories:
Expand Down
Loading