Bitbucket
Cosine AI integrates directly with Bitbucket Cloud
Note: This guid pertains to Bitbucket Cloud, for information on integrating Bitbucket Server/Data Center, please contact the Cosine team directly at [email protected]
This guide walks you through installing the integration, granting permissions, selecting repositories, and managing or revoking access.
Overview
With the Bitbucket Cloud integration, Cosine can:
Import your bitbucket repositories into the platform
Create and push branches to your repositories
Open pull requests automatically for tasks including code changes.
Notice when there are changes to pull requests from outside the Cosine platform and automatically keep up to date on:
The latest PR status
The commits to the branch
Prerequisites
Before installing the integration:
You must have a Bitbucket Cloud account
You must have permission to authorise apps on your Bitbucket workspace
You must be a member of the Cosine team you want to connect
Tip: We recommend you create a dedicated Bitbucket user (e.g.,
[email protected]) for clearer audit trails when Cosine commits or updates PRs. Details for doing this can be found in the Bitbucket Integration page
Installing the Bitbucket Integration
Follow these steps to connect Bitbucket Cloud to your Cosine team.
1. Start the installation from Cosine
Open your Cosine dashboard
Navigate to your Team Settings
Open the Integrations tab
Select Bitbucket Cloud
Click Connect Bitbucket Account
Note: You will see a section above this button guiding you through creating a dedicated Cosine account to use for the installation, we recommend you do this.

2. Sign in and authorise Cosine
You will be prompted to:
Log in to your Bitbucket Cloud account
Grant Cosine permission to access your workspaces and repositories

Cosine requires permissions that enable:
Reading repository information
Creating and updating branches & commits
Managing pull requests
Accessing workspace projects and pipelines
Managing repository webhooks
Click Grant access to continue.
3. Complete the connection
After authorisation, Bitbucket will redirect you back to Cosine, where you’ll see a confirmation that the integration is now active for your team.
Your Bitbucket workspaces will now be available inside Cosine.
Browsing and Selecting Repositories
Once Bitbucket is connected, head over to your Projects and click "New project". You should now see "Import from Bitbucket" as a tab on the left-side panel.
From this tab, you can select the workspace you would like to import from, search the repositories in that workspace, and import the one you would like to use.
If you cannot find the repository you want:
Make sure you have selected the correct Bitbucket workspace
Make sure the Bitbucket account you connected when installing the integration has access to the workspace/repository in question.
Double check the repo hasn't already been imported (repos that you already have created projects for won't show up in the list).

Removing or Re-authorising the Integration
You can manage or disconnect Cosine’s access from either Cosine or Bitbucket. Note that performing either step will prevent the integration from working, but to fully uninstall the integration and all permissions granted to it, you must do both of the following steps.
Remove the integration from Cosine
Go to Team Settings → Integrations
Select Bitbucket Cloud
Click Disconnect
This stops Cosine from interacting with your Bitbucket account.
Remove the integration from Bitbucket (Unauthorising Cosine)
You can fully revoke Cosine’s authorisation from your Bitbucket settings:
🔗 https://bitbucket.org/account/settings/app-authorizations/
On this page you can:
View all apps that have access to your Bitbucket account
Revoke Cosine’s access immediately
Review permissions previously granted

Troubleshooting
Cosine shows “Not Authorised” after installation
This happens if the Bitbucket authorisation was cancelled or expired. → Uninstall and reinstall the integration from Cosine.
Cosine cannot access my repositories
Ensure the Bitbucket user you authorised has:
Access to the workspace
Access to the repository
Sufficient permissions (read/write)
I accidentally revoked access in Bitbucket
Simply uninstall and reinstall the integration from Cosine’s Integration settings.
Last updated
Was this helpful?