How to set up deployment from bitbucket to azure web app?

Emil Nenchev 0 Reputation points
2023-04-19T10:53:48.6333333+00:00

Hello, I am trying to set up continuous deployment from a branch in bitbucket using the azure portal, but when I authorize my bitbucket account and select repository and a branch, I get an error message:
"Failed to set up deployment: Cannot find SourceControlToken with name Bitbucket".

How can I resolve this? Thanks

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,971 Reputation points Microsoft Employee
    2023-04-20T10:09:24.7533333+00:00

    @Emil Nenchev , Thanks for posting this question! The error message usually occurs when the Bitbucket account you are trying to use is not properly authorized in Azure.

    If you haven't done this already so, to resolve this issue, you can try the following steps:

    You may need to check if the token exists and is correctly configured. You can also try to regenerate the token and update the configuration. To regenerate the token, follow these steps:

    1.    Log in to your Bitbucket account and navigate to the repository you want to deploy.

    2.    Click on the "Settings" button in the left-hand menu. 3.    Click on "Access tokens" in the "Access management" section.

    4.    Click on the "Create a token" button.

    5.    Give the token a name and select the appropriate permissions.

    6.    Click on the "Create" button.

    7.    Copy the token and save it in a secure location.

    To update the configuration in the Azure portal, follow these steps:

    1.    Navigate to the "Deployment Center" in the Azure portal. 2.    Click on the "Settings" button in the left-hand menu. 3.    Click on "Source Control" in the "Settings" section.

    4.    Click on the "Manage tokens" button.

    5.    Click on the "Add" button.

    6.    Give the token a name and paste the token value.

    7.    Click on the "Save" button.

    8.    Select the repository and branch you want to deploy.

    9.    Click on the "Save" button. Reference - checkout this document, it's for GitHub/can apply to Bitbucket:

    0 comments No comments