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
191 changes: 120 additions & 71 deletions docs/admin/code_hosts/aws_codecommit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,79 +33,128 @@ AWS CodeCommit connections support the following configuration options, which ar
### admin/code_hosts/aws_codecommit.schema.json

{/* SCHEMA_SYNC_START: admin/code_hosts/aws_codecommit.schema.json */}
{/* WARNING: This section is auto-generated during releases. Do not edit manually. */}
{/* Last updated: 2025-07-10T00:07:31Z via sourcegraph/[email protected] */}
```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"}).
// Other example values:
// - [
// {
// "name": "go-monorepo"
// },
// {
// "id": "f001337a-3450-46fd-b7d2-650c0EXAMPLE"
// }
// ]
// - [
// {
// "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": {
"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.
// 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
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "aws_codecommit.schema.json#",
"title": "AWSCodeCommitConnection",
"description": "Configuration for a connection to AWS CodeCommit.",
"allowComments": true,
"type": "object",
"additionalProperties": false,
"required": ["region", "accessKeyID", "secretAccessKey", "gitCredentials"],
"properties": {
"region": {
"description": "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.",
"type": "string",
"default": "us-east-1",
"pattern": "^[a-z\\d-]+$",
"enum": [
"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"
]
},
"accessKeyID": {
"description": "The AWS access key ID to use when listing and updating repositories from AWS CodeCommit. Must have the AWSCodeCommitReadOnly IAM policy.",
"type": "string"
},
"secretAccessKey": {
"description": "The AWS secret access key (that corresponds to the AWS access key ID set in `accessKeyID`).",
"type": "string"
},
"gitCredentials": {
"title": "AWSCodeCommitGitCredentials",
"description": "The Git credentials used for authentication when cloning an AWS CodeCommit repository over HTTPS.\n\nSee 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.\nFor 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",
"type": "object",
"required": ["username", "password"],
"properties": {
"username": {
"description": "The Git username",
"type": "string",
"minLength": 1
},
"password": {
"description": "The Git password",
"type": "string",
"minLength": 1
}
}
},
"gitURLType": {
"description": "The type of Git URLs to use for cloning and fetching Git repositories.",
"type": "string",
"enum": ["http", "ssh"],
"default": "http"
},
"gitSSHKeyID": {
"description": "The ID of the SSH key created for your IAM users. It is required when using SSH to clone repositories.",
"type": "string"
},
"gitSSHCredential": {
"description": "SSH keys to use when cloning Git repo.",
"$ref": "git.schema.json#/definitions/gitSSHCredential"
},
"gitSSHCipher": {
"description": "SSH cipher to use when cloning via SSH. Must be a valid choice from `ssh -Q cipher`.",
"$ref": "git.schema.json#/definitions/gitSSHCipher"
},
"repositoryPathPattern": {
"description": "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.\n\nFor 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.\n\nIt 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.",
"type": "string",
"default": "{name}",
"examples": ["git-codecommit.us-west-1.amazonaws.com/{name}", "git-codecommit.eu-central-1.amazonaws.com/{name}"]
},
"initialRepositoryEnablement": {
"description": "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.",
"type": "boolean",
"default": false
},
"exclude": {
"description": "A list of repositories to never mirror from AWS CodeCommit. \n\nSupports 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\"}).",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"title": "ExcludedAWSCodeCommitRepo",
"additionalProperties": false,
"anyOf": [{ "required": ["name"] }, { "required": ["id"] }],
"properties": {
"name": {
"description": "The name of an AWS CodeCommit repository (\"repo-name\") to exclude from mirroring.",
"type": "string",
"pattern": "^[\\w.-]+$"
},
"id": {
"description": "The ID of an AWS Code Commit repository (as returned by the AWS API) to exclude from mirroring. Use this to exclude the repository, even if renamed, or to differentiate between repositories with the same name in multiple regions.",
"type": "string",
"pattern": "^[\\w-]+$"
}
}
},
"examples": [
[{ "name": "go-monorepo" }, { "id": "f001337a-3450-46fd-b7d2-650c0EXAMPLE" }],
[{ "name": "go-monorepo" }, { "name": "go-client" }]
]
},
"maxDeletions": {
"description": "The maximum number of repos that will be deleted per sync. A value of 0 or less indicates no maximum.",
"type": "integer",
"default": 0
}
}
}
```
{/* SCHEMA_SYNC_END: admin/code_hosts/aws_codecommit.schema.json */}
Expand Down
Loading