Skip to content

Latest commit

 

History

History
51 lines (29 loc) · 2.79 KB

File metadata and controls

51 lines (29 loc) · 2.79 KB

Bitbucket Cloud

Site admins can sync Git repositories hosted on Bitbucket Cloud with Sourcegraph so that users can search and navigate the repositories.

To connect Bitbucket Cloud to Sourcegraph:

  1. Go to Site admin > Manage code hosts > Add repositories.
  2. Select Bitbucket.org.
  3. Configure the connection to Bitbucket Cloud using the action buttons above the text field. Additional fields can be added using Cmd/Ctrl+Space for auto-completion. See the configuration documentation below.
  4. Press Add repositories.

Repository syncing

Currently, all repositories belonging to the user configured will be synced.

In addition, there is one more field for configuring which repositories are mirrored:

  • teams
    A list of teams that the configured user has access to whose repositories should be synced.
  • exclude
    A list of repositories to exclude, which takes precedence over the teams field.

HTTPS cloning

Sourcegraph clones repositories from your Bitbucket Cloud via HTTP(S), using the username and appPassword required fields you provide in the configuration.

Internal rate limits

Internal rate limiting can be configured to limit the rate at which requests are made from Sourcegraph to Bitbucket Cloud.

If enabled, the default rate is set at 7200 per hour (2 per second), which can be configured via the requestsPerHour field (see below):

  • For Sourcegraph <=3.38, if rate limiting is configured more than once for the same code host instance, the most restrictive limit will be used.
  • For Sourcegraph >=3.39, rate limiting should be enabled and configured for each individual code host connection.

NOTE Internal rate limiting is only currently applied when synchronizing changesets in batch changes, repository permissions, and repository metadata from code hosts.

User authentication

To configure Bitbucket Cloud as an authentication provider (which will enable sign-in via Bitbucket Cloud), see the authentication documentation.

Configuration

Bitbucket Cloud connections support the following configuration options, which are specified in the JSON editor in the site admin "Manage code hosts" area.

[View page on docs.sourcegraph.com](https://docs.sourcegraph.com/admin/external_service/bitbucket_cloud) to see rendered content.

Webhooks

Using the webhooks property on the external service has been deprecated.

Please consult this page in order to configure webhooks.