Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS\Azure-DevOps: Enabling Continuous Integration on pipeline with source from Bitbucket fails with error

Regards,

Your help will be appreciated.

I have created a pipeline in VSTS\Azure-DevOps. It gets its sources from a repository in Bitbucket. Queueing a build works fine. It builds and the tests succeed.

Now I want a build to run on every commit to the repository on Bitbucket. However, when I edit the pipeline and in the Triggers tab enable 'Continuous Integration' and click 'Save' I get the following error:

Unable to configure a service on the selected Bitbucket repository. Bitbucket returned the error 'Forbidden: '.

I am confused that I get 'Forbidden', while getting the source-code already works.

What is it that I am doing wrong? Is there something I must configure in VSTS\Azure-DevOps or in Bitbucket?

like image 306
HenkGijsbert Avatar asked Dec 03 '18 15:12

HenkGijsbert


People also ask

Can Azure DevOps connect to bitbucket?

Azure DevOps ServicesBitbucket and Azure Pipelines are two independent services that integrate well together.

How do I enable pipeline in Azure DevOps?

Sign-in to your Azure DevOps organization and go to your project. Go to Pipelines, and then select New pipeline. Do the steps of the wizard by first selecting GitHub as the location of your source code. You might be redirected to GitHub to sign in.


2 Answers

Answering my own question:

It appeared that in Bitbucket I only had the rights of 'Writer' for the Repository. When we changed it to 'Administrator' enabling Continuous Integration worked and we verified that committing a code change triggered the build.

like image 137
HenkGijsbert Avatar answered Oct 26 '22 04:10

HenkGijsbert


Good news / bad news.

It looks like - for now - you can configure a pipeline without being a BitBucket admin on the repo... but not using the templates.

So you can build an empty pipeline based on a BitBucket repo (no admin access), and manually add each of the tasks.

Based on further tests: what you cannot do is set the Continuous Integration trigger, because that requires admin access to set up the webhooks

I know, this is not what you want... but at least there is a way to end up with a working pipeline.

Regards, Jose

like image 35
Jose Marcenaro Avatar answered Oct 26 '22 04:10

Jose Marcenaro