2025-04-25 18:22:40 +00:00
|
|
|
<Tabs>
|
|
|
|
|
<Tab title="Environment Variable">
|
|
|
|
|
|
|
|
|
|
1. Add the `token` and `user` (username associated with the app password you created) properties to your connection config:
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"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 ..
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
2. Pass this environment variable each time you run Sourcebot:
|
|
|
|
|
```bash
|
|
|
|
|
docker run \
|
|
|
|
|
-e BITBUCKET_TOKEN=<PAT> \
|
|
|
|
|
/* additional args */ \
|
|
|
|
|
ghcr.io/sourcebot-dev/sourcebot:latest
|
|
|
|
|
```
|
|
|
|
|
</Tab>
|
|
|
|
|
|
|
|
|
|
<Tab title="Secret">
|
2025-06-02 01:51:12 +00:00
|
|
|
<Note>Secrets are only supported when [authentication](/docs/configuration/auth/overview) is enabled.</Note>
|
2025-04-25 18:22:40 +00:00
|
|
|
|
|
|
|
|
1. Navigate to **Secrets** in settings and create a new secret with your access token:
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
2. Add the `token` and `user` (username associated with the app password you created) properties to your connection config:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"type": "bitbucket",
|
|
|
|
|
"deploymentType": "cloud",
|
|
|
|
|
"user": "myusername",
|
|
|
|
|
"token": {
|
|
|
|
|
"secret": "mysecret"
|
|
|
|
|
}
|
|
|
|
|
// .. rest of config ..
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
|
</Tabs>
|