Examples

Authenticating with Bitbucket Cloud

In order to index private repositories, you’ll need to provide authentication credentials. You can do this using an App Password or an Access Token

Navigate to the app password creation page and create an app password. Ensure that it has the proper permissions for the scope of info you want to fetch (i.e. workspace, project, and/or repo level)

Next, provide your username + app password pair to Sourcebot:

Environment variables are only supported in a declarative config and cannot be used in the web UI.
  1. Add the token and user (username associated with the app password you created) properties to your connection config:
{
    "type": "bitbucket",
    "deploymentType": "cloud",
    "user": "myusername",
    "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