Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,261
Community Members
 
Community Events
165
Community Groups

bamboo bitbucket integration

hi all,

I have serious issues with this basic integration, which should be probably the simplest one and should work by default.

 

So I am trying to integrated Bamboo 8.0.4 with Bitbucket cloud.

Adding a Linked Repository with shared credentials (SSH or username/password) combo do not work. Setting directly the username and password does not work either.

Screenshot 2022-04-05 at 20.05.53.pngScreenshot 2022-04-05 at 19.59.09.png

The only thing that works is defining the repo as a generic GIT repo and then all credentials work fine - but there are issues with permissions based branches - these policies are not respected.

I appreciate your suggestions.

Regards

 

2 answers

1 accepted

2 votes
Answer accepted

Hello @Valentin Constantinescu @Daniel Saravia

Bitbucket Cloud account passwords have been deprecated since March 1st. Please switch to application passwords to restore your checkouts.

More information here:

 

Thank you,

 

Eduardo Alvarenga
Atlassian Support APAC 

Sincerly, I do not understand how this works.

 

I create an "app password" in the bitbucket user account that I want to use with full permissions for repos.

Screenshot 2022-04-06 at 14.33.06.png

 

I add it to the Bamboo "shared credentials". It does not work to add a new BitBucket cloud repo.

Screenshot 2022-04-06 at 14.31.51.png

 

I try the username/newly created password directly - the same - it detects not the repos.

Screenshot 2022-04-06 at 14.31.33.png

Like Eduardo Alvarenga likes this

@Valentin Constantinescu

You are on the right way. You need to use your Bitbucket.org username and not your email address as the username.

The app password needs to have the following minimal permissions:

  • Repositories (read)
  • Account (read)

And optionally:

  • Pull requests
  • Webhooks

it worked. Thanks for the support.

I'm still not able to connect to bitbucket.

#1 I have created an App Password

#2 I'm using a shared credential with the password auto-generated in step 1

#3 I'm also using my Username as in bitbucket profile settings page

but I'm still getting the same warning message when trying to add a repository and test the connection: We couldn't connect to the repository. The details you provided were invalid.

 #4 this is the log in atlassian-bamboo.log:

2022-04-06 09:59:26,349 WARN [http-nio-8085-exec-16] [XsrfResourceFilter] Additional XSRF checks failed for request: http://localhost:8085/rest/analytics/1.0/publish/bulk , origin: https://mytestingserver.pro , referrer: https://mytestingserver.pro/chain/admin/config/editChainRepository.action , credentials in request: true , allowed via CORS: false

and atlassian-bamboo-access.log:

2022-04-06 10:10:44,574 INFO [http-nio-8085-exec-20] [AccessLogFilter] daniel.saravia PUT http://localhost:8085/rest/api/latest/repository/testConnection 413096kb
2022-04-06 10:10:45,257 INFO [http-nio-8085-exec-23] [AccessLogFilter] daniel.saravia POST http://localhost:8085/rest/analytics/1.0/publish/bulk 411336kb

Please any help is appreciated.

I tested it on my local environment and it worked, so I did a new research and finally found the solution here https://jira.atlassian.com/browse/BAM-18063 

In summary, 

#1 I had to create an App Password as explained by @Eduardo Alvarenga 

#2 Added the configuration to my Tomcat as explained in the above link

#3 Tested again: Connection successful 

Like Eduardo Alvarenga likes this

Thanks @Daniel Saravia, if you liked the solution please vote on it so other Community members will be likely to find it quickly.

I have exactly the same issue, it started around 3 weeks ago. I have even re-installed Bamboo on testing server but got the same result: "We couldn't connect to the repository. The details you provided were invalid." And "Failed to load data from Bitbucket. 401 Unauthorized."

But if I use the same credentials directly in Bitbucket cloud, the login is successful.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

967 views 3 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you