Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

issue with adding cloud bitbucket repository to build plan on self-hosted bamboo

yuryf May 31, 2019

While adding a new repository to existing build plan (with existing repositories) I was faced with the issue that "Test connection" button results in "We couldn't connect to the repository. The details you provided were invalid." and also under the "Username" input field a messages appears stating "Invalid username." which doesn't make much sense to me as with this credentials I'm able to see repositories in the dropdown. 

After realizing there is an issue with new repository I tried to "Test Connection" with existing repositories and it results in the same behavior, even though last repository was added just few days ago without problems. 

Also, when I run the build (with checkouts from existing repositories) it runs successfully, so the credentials by fact are correct.

In logs nothing interesting 


bamboo issue.PNG

bamboo issue 2.PNG

2 answers

1 accepted

7 votes
Answer accepted
Elias Zeidan (they/them)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2019

Hi @yuryf and @Matt Hubble ,

Thank you so much for reaching out to the Atlassian Community.

The Bitbucket Cloud REST APIs were recently updated to comply with GDPR privacy regulations. Part of these updates removed a variable containing information that Bamboo expects in the JSON response from Bitbucket.

This change resulted in the creation of new Linked repositories of type “Bitbucket Cloud” failing with 401 (Unauthorized) exceptions. You may see an “Invalid username” error message in the Bamboo UI, errors in the logs, or issues with the repository lists populating.

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

For more information, please follow our public bug report:

We have been working with the Bamboo developers to create a hotfix for this issue, which we expect will be ready next week.

We sincerely apologize for any inconvenience this may cause. Please let me know if you have any questions or concerns.

Elias Zeidan | Bamboo Senior Support Engineer

yuryf June 1, 2019

Hi Elias

Thank you for confirming it's not on our side - we scratched our heads too intensively trying to understand what's going on.

For the workaround - I've added the repo as git and looks like working, but will need to test more on Monday.

Have a good day


2 votes
Matt Hubble May 31, 2019

I'm seeing the same issue, but in atlassian-bamboo.log I see this when I hit test connection

2019-05-31 12:55:24,557 WARN [http-nio-80-exec-18] [RESTCall] Response from GET<shared credentials account name>/ (404)

The shared credentials account is correct as I'm able to use it to list out repos and branches, but test connection fails and then the repository won't save.

toniq-dave April 20, 2020

Did you ever resolve this? We've got the same problem, same error in logs and we can see the repos/branches, but can't save a new repo.

NoOne April 23, 2020

I have the same issue.

Elias Zeidan (they/them)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 23, 2020

Hi @toniq-dave and @Sergio Giuffrida ,

Thanks for your comments! This looks like a new issue related to Bitbucket Cloud API updates. We've published a new Article about this issue which can be found here:

Bitbucket Cloud now uses the Workspaces API, and requires use of the Bitbucket username instead of email address for authentication.

@Matt Hubble the error logs from the more recent issue match what you posted in your comment. Is the <shared credentials account name> an email address? If you are able to upgrade, Bamboo 6.10.6 and 7.0.3 use the new Workspace API by default.

I hope this helps!

Elias | Bamboo Senior Support Engineer

Like toniq-dave likes this

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events