Unable to add or edit Bitbucket Cloud repository

Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Bamboo versions 6.8.3 and 6.9.1 were released on June 4, 2019

Problem

The Bitbucket Cloud REST APIs were recently updated to comply with GDPR privacy regulations. As part of these updates, the username variable from user objects in the API was deprecated.

Related issue: BAM-20455 - Cannot save Bitbucket Cloud Repository: Invalid Username and We couldn't connect to the repository errors.

Cause

Until Bamboo versions 6.8.3 and 6.9.1, Bamboo expected the username variable in the JSON response from Bitbucket that is used when creating or modifying Linked or Plan repositories. As Bamboo uses that username for authentication checks, this change resulted in 401 (Unauthorized) exceptions when creating and editing Bitbucket Cloud Linked repositories.

Workaround

As a workaround, we recommend creating Linked repositories of type Git or Mercurial to connect to your Bitbucket Cloud repositories.

Resolution

Bamboo versions 6.8.3 and 6.9.1 were released on June 4, 2019

ℹ️ We recently released a series of new and improved upgrade guides for Bamboo. If you are upgrading, please check out the Bamboo Upgrade - Quick Guides.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.