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

Problems connecting Azure DevOps to BitBucket Cloud

Jon Starbird
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 8, 2022

Anyone have any success setting up Azure DevOps pipeline to connect to BitBucket Cloud? 

We can get it connected to see list of repos using grant access or basic auth with app password but once you select a particular repo it fails with:

Unable to get the path contents from the Bitbucket repository 'workspace/reponame' for the branch or source version 'master' and path ''. It is possible the specified path is a file. Error from Bitbucket: Forbidden

Permissions are set correctly. 

Also tried to use oauth consumer but was unable to find the proper callback url for azure devops anywhere on the net. 

I know  this may be Azure DevOps issue but since it's to use BitBucket Cloud I wanted to post here in case someone else has hit this same issue before. 

 

3 answers

0 votes
Adam HerrNeckar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2024

PROBLEM: I faced a similar issue "Unable to get the path contents from the Bitbucket repository...Request timed out after 5000ms" when creating a pipeline in ADO.  This was  after using the same [valid] service connection to BitBucket to create a pipeline for a different repository in the same parent workspace and project

WORKAROUND: I was able to bypass the error by creating a stub file for "azure-pipelines.yml" in the default branch of the target BitBucket repository.

0 votes
ovroman November 22, 2022

We are facing the same issue.

I had to set-up pipelines for two repositories.

For the first one, no issue at all.

For the second one, I had the same error message. 
I found one comment on another thread :
Please add a Note to suggest not adding big binary... (atlassian.com)

It seems to be linked with the fact the repository contains binary files, making the scan impossible.

Already tried the following workaround; create the pipeline with Azure DevOps REST API. But bitbucket pipeline are not supported with this approach.

The last solution is to change repository host service (to a concurrent one...)

0 votes
Paul Hicks
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 8, 2022

Yes, we have these working, with both OAuth2 (grant) and Basic (app password).

I have tried to reproduce your error.

  • I have given inadequate permissions to the app password used in the Service Connection: this prevents creating the connection.
  • I have created a repo with only a nonstandard branch (default branch != 'main' or 'master): works fine.
  • I have removed the app password after creating the service connection: valid error, different to the one you report.

It seems ADO is handling everything correctly. We can go through how you create your Service Connection in more detail, if you like? And check how you've set up your repository and pipeline. Can you post the steps you go through for creating a Service Connection to a BitBucket Cloud repository?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events