Examples

Authenticating with Bitbucket Data Center

In order to index private repositories, you’ll need to provide an access token to Sourcebot.

Create an access token for the desired scope (repo, project, or workspace). Visit the official Bitbucket Data Center docs for more info.

Next, provide the access token to Sourcebot:

Environment variables are only supported in a declarative config and cannot be used in the web UI.
  1. Add the token property to your connection config:
{
    "type": "bitbucket",
    "token": {
        // note: this env var can be named anything. It
        // doesn't need to be `BITBUCKET_TOKEN`.
        "env": "BITBUCKET_TOKEN"
    }
    // .. rest of config ..
}
  1. Pass this environment variable each time you run Sourcebot:
docker run \
    -e BITBUCKET_TOKEN=<PAT> \
    /* additional args */ \
    ghcr.io/sourcebot-dev/sourcebot:latest

Schema reference