Skip to main content
Table of Contents

Integration Guide - Bitbucket (Cloud + Server)

Connect Bitbucket (Cloud & Server) to LinearB. Connect Bitbucket to LinearB to sync repositories, branches, and pull requests so you can power delivery metrics and automation. Overview. LinearB suppo…

heather.hazell
Updated by heather.hazell

Connect Bitbucket (Cloud & Server) to LinearB

Connect Bitbucket to LinearB to sync repositories, branches, and pull requests so you can power delivery metrics and automation.


Overview

LinearB supports both Bitbucket Cloud and Bitbucket Server (on-prem). When you connect Bitbucket, LinearB reads repository and pull request activity and uses it to calculate metrics such as cycle time, PR size, and deployment frequency.

Use this guide to choose the correct Bitbucket type and complete the setup.


Before You Begin

Prerequisites

  • LinearB user with Admin permissions.
  • Bitbucket account:
    • Bitbucket Cloud: You must be able to authorize apps and access the repositories you want to connect.
    • Bitbucket Server: Ability to create Personal Access Tokens and access the Bitbucket Server URL.

Security note: LinearB uses read-level access to analyze Git history and metadata. It does not modify your code or branches.

Expected Time to Complete

  • Bitbucket Cloud: ~5–10 minutes.
  • Bitbucket Server: ~10–20 minutes (includes any firewall changes).

Bitbucket Cloud Connection

1. Select Bitbucket Cloud as Your Git Provider
  1. In LinearB, navigate to Settings → Company Settings, then select the Git tab.
  2. Click Add Integration.
  3. Select Bitbucket (Cloud) from the list of available Git providers.
2. Authorize LinearB in Bitbucket Cloud
  1. Click Continue in LinearB to open the Bitbucket Cloud authorization flow.
  2. Sign in to your Bitbucket Cloud account if prompted.
  3. When Bitbucket asks you to grant access, click Grant access to authorize LinearB.
  4. If you see a second login prompt:
    • The first login creates or links your LinearB user.
    • The second connects your Bitbucket Git account.
3. Add Bitbucket Repositories
  1. After authorization, open your Bitbucket integration in LinearB.
  2. Click Add repositories.
  3. Select the repositories you want LinearB to follow.
    • Only repositories that are not already linked to another Git connection will appear for selection.
  4. Click Save repositories.

LinearB will begin processing commit and pull request data from the selected repositories. Initial backfill may take some time, depending on repository size and history.

4. Adding Multiple Git Connections (Paid Accounts Only)

On LinearB paid plans, admins can connect multiple Git providers (for example, Bitbucket + GitHub + GitLab):

  1. In LinearB, go to Settings → Company Settings → Git.
  2. Click Add Integration.
  3. Choose an additional Git provider and follow its connection guide.

Bitbucket Server (On-Prem) Connection

Note: Connecting to Bitbucket Server (on-premises) is available on LinearB paid plans.

1. Select Bitbucket Server as Your Git Provider
  1. In LinearB, navigate to Settings → Company Settings, then select the Git tab.
  2. Click Add Integration.
  3. Select Bitbucket Server as your Git provider.
2. Allow LinearB Access (Firewall / Network)

If your Bitbucket Server instance is accessible from the public internet, you can skip this step.

If Bitbucket Server is hosted within a private network, you must allow LinearB’s public IP addresses in your firewall:

  • 52.15.80.85
  • 13.56.203.235
  • 54.151.81.98
  • 18.118.232.229

For networks behind a VPN, ensure that a reverse proxy allows LinearB-specific access to Bitbucket Server.

3. Insert Your Bitbucket Server URL
  1. After allowing LinearB’s IP addresses, enter your Bitbucket Server URL in the LinearB setup screen.
  2. LinearB will automatically check connectivity.
  3. Once verified, click Continue to proceed.
4. Create a Personal Access Token in Bitbucket Server
  1. Log in to your Bitbucket Server instance.
  2. Navigate to Manage Account → Account Settings → Personal Access Tokens.
  3. Click Create a token.
  4. Provide a descriptive name and select the required Read permissions.
  5. Click Create, then copy the token. You will not be able to see it again.
  6. Store the token securely.
5. Validate and Connect
  1. Return to the LinearB setup interface.
  2. Paste the Bitbucket Server Personal Access Token into the token field.
  3. Click Connect. LinearB will validate the token.
  4. Once validated, proceed to repository selection and choose which repos LinearB should follow.

Verify

How to Confirm the Integration is Working
  • In LinearB, go to Settings → Company Settings → Git.
  • Check that a Bitbucket Cloud and/or Bitbucket Server integration appears with a Connected status.
  • Open the integration entry and confirm that repositories are listed under the connection.
  • After initial processing, commits and pull requests from those repositories should appear in your LinearB views (for example, Delivery and Work Breakdown).

Troubleshooting

Problem Cause Fix
Bitbucket Server connection fails Server not reachable from LinearB Verify your Bitbucket Server URL and confirm that LinearB’s IPs are allowlisted in your firewall or reverse proxy.
Some repositories are missing in LinearB User/token does not have access, or repos are not selected Ensure the Bitbucket account has access to the missing repositories and add them under Add repositories in the Bitbucket integration in LinearB.
Token rejected for Bitbucket Server Token lacks required read permissions or was copied incorrectly Regenerate a Personal Access Token with the necessary read permissions, copy it again, and paste it into the LinearB setup interface.
Real-time updates appear delayed Network/firewall restrictions block webhook/API calls Confirm that the listed LinearB IPs can reach Bitbucket Server.

FAQs

How do I know if I should choose Bitbucket Cloud or Bitbucket Server?
If your repositories are hosted on Bitbucket’s managed platform, use Bitbucket Cloud. If they are hosted on your own infrastructure, use Bitbucket Server.

Can I connect both Bitbucket Cloud and Bitbucket Server?
Yes. On paid LinearB plans, admins can add multiple Git connections from Account Settings → Git.

Do I need to sync all repositories?
No. Select only the repositories that are relevant for the teams and metrics you want to track.


Next Steps

✅ You’ve successfully connected Bitbucket (Cloud or Server) to LinearB.

How did we do?

Integration Guide - Azure DevOps Repos

Integration Guide - GitHub Cloud

Contact