Skip to main content

Overview

The Bitbucket integration connects your Bitbucket repositories to G360 and collects repository-level data for reporting, DORA metrics, CI/CD tracking, and repository insights. With this integration, you can:
  • Synchronize repositories
  • Analyze commits and code activity
  • Collect pipeline and deployment data
  • Map repositories to projects for reporting
  • Visualize engineering metrics
The setup flow is similar to GitLab, with a few Bitbucket-specific authentication and configuration differences.

Prerequisites

Before you configure the integration, make sure you have:
  • Access to the Engineering Metrics dashboard
  • A Bitbucket account with access to the workspace and repositories you want to connect
  • Permission to create Bitbucket Personal Access Tokens
  • A valid Bitbucket Personal Access Token (see Create a Bitbucket token)

Create a Bitbucket connection

1

Open Bitbucket integrations

In Engineering Metrics, go to Integration → Data Integrations Hub. Under Repository Integrations, find Bitbucket and click Connect if no connection exists, or Manage if one is already configured.
2

Start a new connection

On the Bitbucket Connections page, click New Connection. The connection configuration window opens.
3

Enter connection details

4

Test the connection

Click Test Connection. G360 validates endpoint accessibility, username authentication, API token permissions, and Bitbucket API communication. A successful test confirms that the connection is configured correctly.
5

Save the connection

Click Save Connection. The connection appears in the Connections panel.
An incorrect username or a token with insufficient permissions can cause test connection failures, missing repositories, and incomplete synchronization.
Bitbucket previously used app passwords. Newer implementations may use API tokens instead, depending on your Bitbucket environment and configuration.

Create a Bitbucket token

A Bitbucket Personal Access Token (PAT) securely authenticates your Bitbucket account and lets G360 access repository data. The token must be able to access repositories, read repository metadata, and fetch commit and pipeline-related data.
1

Sign in to Bitbucket

Open Bitbucket and sign in with your Bitbucket credentials.
2

Open Personal access tokens

Click your profile avatar in the top-right corner, select Personal settings, then select Personal access tokens in the left navigation panel. Click Create token.
3

Configure the token

4

Select required permissions

Enable Read access for each of the following:
  • Repository
  • Workspace
  • Organization
  • Account
These map to the following minimum required scopes:
5

Create and copy the token

Click Create, then copy the generated token immediately.
6

Use the token

Paste the token into the API Token field when you create the Bitbucket connection, complete the remaining connection details, and save the connection.
Bitbucket shows the Personal Access Token only once. Copy it immediately and store it securely, because you can’t view it again.
The organization:bitbucket scope supports organization-scoped analytics and reporting across all workspaces and repositories tied to the account. If your organization requires additional permissions for specific APIs or integrations, grant only the minimum necessary, following your organization’s security guidelines.

Configure data scopes

A data scope is a Bitbucket repository that you authorize for synchronization. Only selected repositories become part of the G360 synchronization scope.
1

Open Add Data Scope

Select the Bitbucket connection and click Add Data Scope.
2

Select repositories

Use the search bar to find a repository, select it with the checkbox, then click Add Scope. The repository table shows Repository Name, Organization, and Last Updated Time.

Scope configurations

After you add repository scopes, associate Scope Configurations with them. A scope configuration defines:
  • What data to collect
  • Which engineering entities to track: Code Management, Code Review, Issue Tracking, CI/CD, and Cross Domain
  • CI/CD deployment stage configuration
  • Metrics collection behavior
In the scope configuration, set the deployment stage identifiers and pipeline names, for example deploy, production, or release. This lets G360 identify the deployment activity that DORA metrics and CI/CD analytics need.

Map repositories to projects

1

Open a project

Go to the Projects section and create or edit a project.
2

Select the connection and scopes

Select the Bitbucket connection, then select one or more repository scopes.
3

Configure sync behavior

Configure synchronization behavior (see Synchronization and metrics), then complete the setup.

Synchronization and metrics

G360 collects repository and pipeline data from the scoped repositories on a schedule. Configure the behavior as part of project setup.

Enable DORA metrics

1

Open project settings

Go to the project settings.
2

Enable deployment settings

Enable the required deployment-related settings and save the configuration.
This step is required for DORA metrics collection. It is not required for commit metrics, standard CI/CD metrics, or repository analytics.

Run a sync or retransform data

Monitor status

The Status section shows synchronization history, task execution duration, completed tasks, success and failure states, and execution timestamps. Use it to monitor synchronization and troubleshoot issues.

Troubleshooting

Possible causes
  • Invalid API token
  • Incorrect username
  • Endpoint connectivity issues
  • Missing permissions
Actions
  • Verify the token is valid.
  • Confirm the username matches the Bitbucket account.
  • Validate that the endpoint is accessible.
  • Recheck the token permissions.
Possible causes
  • Insufficient repository permissions
  • Incorrect account access
  • Synchronization issues
Actions
  • Verify repository visibility.
  • Confirm the token permissions.
  • Retry synchronization.
Possible causes
  • API throttling
  • Invalid deployment stage mappings
  • Partial task failures
Actions
  • Enable a custom rate limit if required.
  • Validate the CI/CD stage names.
  • Review the task status logs.

Best practices

  • Use a dedicated Bitbucket service account instead of a personal account. It improves security and simplifies maintenance and credential management.
  • Grant only the minimum required token permissions: repository read, metadata access, pipeline access if you need CI/CD metrics, and organization read if you need organization-scoped analytics.
  • Store tokens securely in a password manager or secret management solution.
  • Rotate tokens periodically according to your organization’s security policy.
  • Revoke unused or compromised tokens immediately.
  • Use descriptive connection names, for example Bitbucket Production, Bitbucket Engineering, or Bitbucket Internal Workspace, to keep multiple integrations maintainable.
  • Synchronize only the repositories you need for reporting and analytics. It speeds up synchronization, lowers API usage, and improves platform performance.

Summary

The Bitbucket integration connects your Bitbucket repositories to G360. After setup, repository and pipeline data is available for analytics, CI/CD and DORA metrics can be generated, and repository trends and engineering insights are accessible from the dashboard.