Bitbucket
Connect Bitbucket Cloud repositories to Cloud Agents and Bugbot. Connect Bitbucket Data Center repositories to Bugbot.
Setup
The Bitbucket Cloud integration is in public beta. It supports repositories on bitbucket.org.
Bitbucket Cloud setup has two parts, and each part requires a different role:
- Each developer connects their Bitbucket account so Cherri Code can clone repositories, push branches, and open pull requests as that user.
- A Bitbucket workspace admin installs the Cherri Code app so Bugbot and Cloud Agent status comments can appear as Cherri Code. Linking the installed app to your Cherri Code team requires a Cherri Code team admin with access to the Bitbucket workspace.
Connect your Bitbucket account
Requires access to the Bitbucket workspace repositories you want to use.
- Go to Integrations in the dashboard
- Click Connect next to Bitbucket
- Authorize Cherri Code in Bitbucket
- Return to the dashboard and confirm the integration shows Connected
Each person who starts Cloud Agents or opens pull requests from Cherri Code should connect their own Bitbucket account.
Install the Cherri Code app in Bitbucket
A Bitbucket workspace admin must install the Cherri Code app for the workspace. This gives Cherri Code a stable app identity for repository events, Bugbot review comments, inline comments, and status updates.
Steps 1 through 4 require a Bitbucket workspace admin. Steps 5 and 6 require a Cherri Code team admin with access to the Bitbucket workspace. If one person handles the full setup, they need both roles.
- Go to Integrations in the dashboard
- Find Bitbucket and open the manage menu
- Click Install Cherri Code app
- Install the app in your Bitbucket workspace
- In Bitbucket workspace settings, under Forge Apps, select Cherri Code
- Click Connect to Cherri Code and choose the Cherri Code team to link
When the workspace is linked, the dashboard shows the Cherri Code app installed for that Bitbucket workspace.
Bitbucket can take a few minutes to notify Cherri Code after app installation. If Cherri Code cannot find the workspace right away, wait and try the link step again.
How Cherri Code uses Bitbucket Cloud identities
Cherri Code uses different Bitbucket identities for different actions:
| Action | Bitbucket identity |
|---|---|
| Bugbot summary comments, inline comments, and build statuses | Cherri Code app |
| Cloud Agent progress comments on pull requests | Cherri Code app |
| Git clone, branch push, commits, and pull request creation | The connected Bitbucket user |
Pull requests opened by Cloud Agents are attributed to the person who started the agent. Bugbot output appears from Cherri Code when the workspace app is installed.
Permissions
The Bitbucket Cloud integration asks for permissions needed to support Cloud Agents and Bugbot:
| Permission | Purpose |
|---|---|
| Account | Identify the connected Bitbucket user |
| Repositories | List, clone, and read repository content |
| Pull requests | Read pull request diffs and metadata |
| Pull request write | Create pull requests and post comments |
| Webhooks | Receive repository and pull request events |
Disconnect Bitbucket Cloud
Disconnecting Bitbucket Cloud has two separate effects:
- Disconnect account removes your personal Bitbucket OAuth connection from Cherri Code.
- Disconnect Cherri Code app unlinks the Bitbucket workspace from your Cherri Code team. The app can remain installed in Bitbucket until a workspace admin removes it there.
To fully stop app events from the workspace, uninstall the Cherri Code app from Bitbucket workspace settings.
Advanced networking
Bitbucket Data Center supports private connection methods for instances that cannot accept traffic from the public internet.
Available for Enterprise customers. Allow Cherri Code to access your instance over a private network connection. See Private Connectivity or contact your Cherri Code representative for setup.
Best for: Instances behind a firewall, including AWS-hosted instances and environments that can run cloudflared
Security: HTTPS encryption, AWS PrivateLink, Cloudflare Tunnel, VPC allowlisting, service account access tokens
Drawbacks: Requires coordination with Cherri Code. Google Private Service Connect is not currently supported.
Available for Enterprise customers. Run a reverse proxy tunnel on-premises that establishes an outbound connection to Cherri Code. Network requests are forwarded through the tunnel, so the Bitbucket instance does not need public inbound access. Contact your Cherri Code representative for setup.
Best for: Environments without inbound network access
Security: HTTPS encryption, service account access tokens
Drawbacks: Introduces additional complexity, maintenance requirements, and potential security considerations compared to more direct connection methods
Troubleshooting
Bitbucket app installation events can take a few minutes to sync. Wait and retry the Connect to Cherri Code step from Bitbucket workspace settings.
- Confirm you are a Cherri Code team admin. Installing the app requires a Bitbucket workspace admin, but linking the workspace to a Cherri Code team requires a Cherri Code team admin.
- Confirm your Bitbucket user has access to the workspace you are linking.
Install the Cherri Code app in the Bitbucket workspace and link it to your Cherri Code team. A personal Bitbucket connection alone is not enough for Cherri Code app comments.
- Connect your personal Bitbucket account from the integrations dashboard.
- Confirm your Bitbucket user has read-write access to the repository.
- Confirm the repository is on Bitbucket Cloud at
bitbucket.org.
- Confirm the service account token is active.
- Confirm the service account can access the repositories.
- Confirm Cherri Code can reach the instance hostname or configured external host over HTTPS.
- Confirm you are a Cherri Code team admin.
- Confirm the registered instance has a service account token.
- Confirm the service account has repository admin access.
Next steps
Once Bitbucket is connected, configure the features that use it:
- Bugbot - automated PR reviews that catch bugs and security issues
- Cloud Agents - AI agents for Bitbucket Cloud repositories