Code host connections
Sourcegraph can sync repositories from code hosts and other similar services. We designate code hosts between Tier 1 and Tier 2 based on Sourcegraph's capabilities when used with those code hosts.
Tier 1 code hosts
Tier 1 code hosts are our highest level of support for code hosts. When leveraging a Tier 1 code host, you can expect:
- Scalable repository syncing - Sourcegraph is able to reliably sync repositories from this code host up to 100k repositories. (SLA TBD)
- Scalable permissions syncing - Sourcegraph is able to reliably sync permissions from this code host for up to 10k users. (SLA TBD)
- Authentication - Sourcegraph is able to leverage authentication from this code host (i.e. Login with GitHub).
- Code Search - A developer can seamlessly search across repositories from this code host. (SLAs TBD)
- Code Monitors - A developer can create a code monitor to monitor code in this repository.
- Code Insights - Code Insights reliably works on code sync'd from a tier 1 code host.
- Batch Changes - A Batch Change can be leveraged to submit code changes back to a tier 1 code host while respecting code host permissions.
|Code Host||Status||Repository Syncing||Permissions Syncing||Authentication||Code Search||Code Monitors||Code Insights||Batch Changes|
|GitHub Self-Hosted Enterprise||Tier 1||✓||✓||✓||✓||✓||✓||✓|
|GitLab Self-Hosted||Tier 1||✓||✓||✓||✓||✓||✓||✓|
|Bitbucket Cloud||Tier 1||✓||✓||✓||✓||✓||✓||✓|
|Bitbucket Server||Tier 1||✓||✓||✓||✓||✓||✓||✓|
|Gerrit Beta||Tier 2 (Working on Tier 1)||✓||✓||✓||✓||✓||✓||✗|
|Azure DevOps||Tier 1||✓||✓||✓||✓||✓||✓||✓|
|Perforce||Tier 2 (Working on Tier 1)||✓||✓||✗||✓||✓||✗||✗|
|Plastic SCM (Enterprise)||Tier 2||✓||✗||✗||✓||✓||✓||✗|
A code host status is:
- 🟢 Generally Available: Available as a normal product feature up to 100k repositories.
- 🟡 Partially available: Available, but may be limited in some significant ways (either missing or buggy functionality). If you plan to leverage this, please contact your Customer Engineer.
- 🔴 Not available: This functionality is not available within Sourcegraph
Tier 2: Code Hosts
We recognize there are other code hosts including CVS, SVN, and many more. Today, we do not offer native integrations with these code hosts and customers are advised to leverage Src-srv-git and the explicit permissions API as a way to ingest code and permissions respectively into Sourcegraph.
Src-srv-git and the explicit permissions API follow the same scale guidance shared above (up to 100k repos and 10k users).
Configure a code host connection
Site admins can configure Sourcegraph to sync code from the following code hosts:
- Bitbucket Cloud
- Bitbucket Server / Bitbucket Data Center
- Azure DevOps
- Gerrit Beta
- Other Git code hosts (using a Git URL)
- Non-Git code hosts
For information on code host-related rate limits, see rate limits.
Temporarily disabling requests to code hosts
It may be the case that you'd like to temporarily disable all
git and API requests from Sourcegraph to a code host. Adding the following to your site configuration will stop Sourcegraph from sending requests to the configured code host connections:
"disableAutoGitUpdates": true, "disableAutoCodeHostSyncs": true, "gitMaxCodehostRequestsPerSecond": 0, "gitMaxConcurrentClones": 0
Testing Code Host Connections
In Sourcegraph 4.4, site administrators have the ability to test a code host connection via the site-admin UI to improve the debuggability when something goes wrong. This check confirms that Sourcegraph has the ability to connect with the respective code host via TCP dial.