Integrations

Bitbucket

View as Markdown

Connect Bitbucket Cloud repositories to Cloud Agents and Bugbot. Connect Bitbucket Data Center repositories to Bugbot.

Security Reviewer and Vulnerability Scanner support Bitbucket Cloud repositories. They don't support Bitbucket Data Center repositories.

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 Grok Build can clone repositories, push branches, and open pull requests as that user.
  • A Bitbucket workspace admin installs the Cursor app so Bugbot and Cloud Agent status comments appear under that app's name, Cursor. Linking the installed app to your Grok Build team requires a Grok Build team admin with access to the Bitbucket workspace.

Connect your Bitbucket account

Requires access to the Bitbucket workspace repositories you want to use.

  1. Go to Integrations in the dashboard
  2. Click Connect next to Bitbucket
  3. Authorize Grok Build in Bitbucket
  4. Return to the dashboard and confirm the integration shows Connected

Each person who starts Cloud Agents or opens pull requests from Grok Build should connect their own Bitbucket account.

Install the Cursor app in Bitbucket

A Bitbucket workspace admin must install the Cursor app for the workspace, which the dashboard calls the Bitbucket app. This gives Grok Build 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 Grok Build team admin with access to the Bitbucket workspace. If one person handles the full setup, they need both roles.

  1. Go to Integrations in the dashboard
  2. Find Bitbucket and open the manage menu
  3. Click Install Bitbucket app
  4. Install the app in your Bitbucket workspace
  5. In Bitbucket workspace settings, under Forge Apps, select Cursor, the name the app is listed under in Bitbucket
  6. Click Connect to Cursor and choose the Grok Build team to link

When the workspace is linked, the dashboard shows Bitbucket app installed for that Bitbucket workspace.

Bitbucket can take a few minutes to notify Grok Build after app installation. If Grok Build cannot find the workspace right away, wait and try the link step again.

How Grok Build uses Bitbucket Cloud identities

Grok Build uses different Bitbucket identities for different actions:

ActionBitbucket identity
Bugbot summary comments, inline comments, and build statusesCursor app
Cloud Agent progress comments on pull requestsCursor app
Git clone, branch push, commits, and pull request creationThe connected Bitbucket user

Pull requests opened by Cloud Agents are attributed to the person who started the agent. Bugbot output appears from the Cursor app when the workspace app is installed.

Permissions

The Bitbucket Cloud integration asks for permissions needed to support Cloud Agents and Bugbot:

PermissionPurpose
AccountIdentify the connected Bitbucket user
RepositoriesList, clone, and read repository content
Pull requestsRead pull request diffs and metadata
Pull request writeCreate pull requests and post comments
WebhooksReceive repository and pull request events

Disconnect Bitbucket Cloud

Disconnecting Bitbucket Cloud has two separate effects:

  • Disconnect removes your personal Bitbucket OAuth connection from Grok Build.
  • Disconnect Bitbucket app unlinks the Bitbucket workspace from your Grok Build 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 Cursor app from Bitbucket workspace settings.

Switch Bitbucket workspaces

A Grok Build team uses one Bitbucket workspace at a time. To move your team to another workspace, a Grok Build team admin opens the Bitbucket manage menu in Integrations in the dashboard and selects Switch workspace. Switching disconnects the Cursor app from the current workspace, so Grok Build stops listing its repositories and Bugbot stops commenting there. The app stays installed in Bitbucket.

Then finish connecting the new workspace. In its Bitbucket workspace settings, under Forge Apps, select Cursor, click Connect to Cursor, and choose your Grok Build team. If the Cursor app isn't installed in that workspace yet, install it first.

Advanced networking

Bitbucket Data Center supports private connection methods for instances that cannot accept traffic from the public internet.

AWS PrivateLink or Cloudflare Tunnel

Available for Enterprise customers. Allow Grok Build to access your instance over a private network connection. See Private Connectivity or contact your Grok Build 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 Grok Build. Google Private Service Connect is not currently supported.

Reverse Proxy Tunnel

Available for Enterprise customers. Run a reverse proxy tunnel on-premises that establishes an outbound connection to Grok Build. Network requests are forwarded through the tunnel, so the Bitbucket instance does not need public inbound access. Contact your Grok Build 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

Grok Build cannot find my Bitbucket workspace

Bitbucket app installation events can take a few minutes to sync. Wait and retry the Connect to Cursor step from Bitbucket workspace settings.

I installed the Cursor app but cannot link it to my Grok Build team
  • Confirm you are a Grok Build team admin. Installing the app requires a Bitbucket workspace admin, but linking the workspace to a Grok Build team requires a Grok Build team admin.
  • Confirm your Bitbucket user has access to the workspace you are linking.
Bugbot comments do not appear as the Cursor app

Install the Cursor app in the Bitbucket workspace and link it to your Grok Build team. A personal Bitbucket connection alone is not enough for comments from the Cursor app.

Cloud Agent cannot access a Bitbucket repository
  • 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.
Grok Build cannot list my Bitbucket Data Center repositories
  • Grok Build lists the team's Bitbucket Data Center repositories with your own linked Bitbucket account, not the service account. Connect your account from Integrations in the dashboard, or click Reconnect if the link has expired.
  • If you can't connect your account, ask a team admin to turn on account linking for the instance in its Application link settings.
  • Confirm your Bitbucket user can access the repositories.
  • Confirm Grok Build can reach the instance hostname or configured external host over HTTPS.
I cannot enable Bugbot on a Bitbucket Data Center repository
  • Confirm you are a Grok Build team admin.
  • Confirm the registered instance has a service account token.
  • Confirm the registered instance has an application link client ID and client secret. If the instance is off, a team admin sets them from the instance's Application link settings.
  • 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

Last updated: November 23, 2026