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
89 changes: 42 additions & 47 deletions docs/admin/code_hosts/aws_codecommit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,86 +34,81 @@ 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:51:51Z via sourcegraph/sourcegraph@v6.5.1211 */}
```json
{
// REQUIRED:
// 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"
// - },
// - {
// - "id": "f001337a-3450-46fd-b7d2-650c0EXAMPLE"
// - }
// - ]
// - [
// {
// "name": "go-monorepo"
// },
// {
// "name": "go-client"
// }
// ]
// - {
// - "name": "go-monorepo"
// - },
// - {
// - "name": "go-client"
// - }
// - ]
"exclude": null,

// REQUIRED:
// 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,
"gitCredentials": {
"password": null,
"username": null
},

// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
"gitSSHCipher": null,

// SSH keys to use when cloning Git repo.
"gitSSHCredential": null,

// The ID of the SSH key created for your IAM users. It is required when using SSH to clone repositories.
"gitSSHKeyID": null,

// The type of Git URLs to use for cloning and fetching Git repositories.
// Valid options: "http", "ssh"
"gitURLType": "http",

// 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.
"initialRepositoryEnablement": false,

// The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.
"maxDeletions": 0,

// REQUIRED:
// 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.
// Valid options: "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"
"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}"
"repositoryPathPattern": "{name}",

// REQUIRED:
// 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
95 changes: 65 additions & 30 deletions docs/admin/code_hosts/azuredevops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,68 +67,103 @@ 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:51:50Z via sourcegraph/sourcegraph@v6.5.1211 */}
```json
// Authentication alternatives: token OR windowsPassword

{
// 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/myrepo"
// },
// {
// "name": "myorg/myproject/myotherrepo"
// },
// {
// "pattern": "^topsecretproject/.*"
// }
// ]
// - {
// - "name": "myorg/myproject/myrepo"
// - },
// - {
// - "name": "myorg/myproject/myotherrepo"
// - },
// - {
// - "pattern": "^topsecretproject/.*"
// - }
// - ]
"exclude": null,

// SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.
"gitSSHCipher": null,

// SSH keys to use when cloning Git repo.
"gitSSHCredential": null,

// 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.
// If "ssh", Sourcegraph will access repositories using Git URLs of the form [email protected]:v3/myrepo. See the documentation for how to provide SSH private keys and known_hosts: https://sourcegraph.com/docs/admin/repo/auth.
// Valid options: "http", "ssh"
"gitURLType": "http",

// The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.
"maxDeletions": 0,

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

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

// Rate limit applied when making background API requests.
"rateLimit": {
"enabled": false,
"requestsPerHour": 0
},

// The pattern used to generate the corresponding Sourcegraph repository name for a Azure DevOps repository.
// - "{host}" is replaced with the Azure DevOps URL's host (such as dev.azure.com)
// - "{orgName}" is replaced with the repository's parent projects owning organization (or collection on DevOps server)
// - "{projectName}" is replaced with the repository's parent project
// - "{repositoryName}" is replaced with the repository's name.
// For example, if your Azure DevOps is https://dev.azure.com and your Sourcegraph is https://src.example.com, then a repositoryPathPattern of "{host}/{orgName}/{projectName}/{repositoryName}" would mean that a Azure DevOps repository at https://dev.azure.com/MYORG/MYPROJECT/MYREPO is available on Sourcegraph at https://src.example.com/dev.azure.com/MYORG/MYPROJECT/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.
// Other example values:
// - ["org/project"]
// - "{projectName}/{repositoryName}"
"repositoryPathPattern": "{host}/{orgName}/{projectName}/{repositoryName}",

// The Personal Access Token associated with the Azure DevOps username used for authentication.
"token": null,

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

// A username for authentication with the Azure DevOps code host.
"username": null
// REQUIRED:
// A username for authentication with the Azure DevOps code host. Typically an email address when connect to Azure DevOps Services (cloud) and a domain\username when connecting to Azure DevOp Server (onPrem)
"username": null,

// Windows account password (Azure Devops Server OnPrem Only): This is needed to clone the repo, the Token will be used for REST API calls
"windowsPassword": null
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/azuredevops.schema.json */}

## Configuration Notes

### Token Requirements
Expand Down
Loading