Sourcebot can sync code from Gitea Cloud, and self-hosted.

Examples

Authenticating with Gitea

In order to index private repositories, you’ll need to generate a Gitea access token. Generate a Gitea access token here. At minimum, you’ll need to select the read:repository scope. read:user and read:organization are required for the user and org fields of your config file:

Gitea Access token creation

Next, provide the access token via the token property, either as an environment variable or a secret:

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": "gitea",
    "token": {
        // note: this env var can be named anything. It
        // doesn't need to be `GITEA_TOKEN`.
        "env": "GITEA_TOKEN"
    }
    // .. rest of config ..
}
  1. Pass this environment variable each time you run Sourcebot:
docker run \
    -e GITEA_TOKEN=<PAT> \
    /* additional args */ \
    ghcr.io/sourcebot-dev/sourcebot:latest

Connecting to a custom Gitea

To connect to a custom Gitea deployment, provide the url property to your config:

{
    "type": "gitea",
    "url": "https://gitea.example.com"
    // .. rest of config ..
}

Schema reference