17
votes

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?

2
Look at your Bitbucket permissions. You need appropriate permissions to create a web hook in BitBucket, so that BitBucket can tell Azure DevOps when commits are pushed.Daniel Mann

2 Answers

19
votes

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.

1
votes

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