Connecting your code
Linking code from Gitea
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:
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.
- Add the
token
property to your connection config:
- Pass this environment variable each time you run Sourcebot:
Environment variables are only supported in a declarative config and cannot be used in the web UI.
- Add the
token
property to your connection config:
- Pass this environment variable each time you run Sourcebot:
Secrets are only supported when authentication is enabled.
- Navigate to Secrets in settings and create a new secret with your PAT:
- Add the
token
property to your connection config:
Connecting to a custom Gitea
To connect to a custom Gitea deployment, provide the url
property to your config: