Share via

Azure deployment is unable to fetch bitbucket branch

GatewayDev-Rex 0 Reputation points
2026-05-05T03:36:32.7666667+00:00

I have been unable to fetch branch from any bitbucket repo. I was able to switch branches without problems before but I have this problem now. I have been unable to come up with a solution for this problem.

Screenshot 2026-05-05 at 11.31.58 AM

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-05-05T03:36:48.4833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The most likely cause is that the Bitbucket authorization or stored repository metadata in App Service Deployment Center has become invalid, so the backend can no longer list branches and shows “Failed to fetch”. A similar issue is documented for Azure Repos where the stored repo URL/authorization became invalid and re‑authorizing fixed it.

    Use these steps to recover:

    1. In the Web App → Deployment → Deployment Center → Settings page, disconnect the existing Bitbucket configuration completely (remove the source control connection rather than just changing the branch).
    2. Save the Web App configuration.
    3. In the same Deployment Center blade, configure the source again:
      • Choose Bitbucket as the source.
      • When prompted, re‑authorize Bitbucket access (OAuth). Ensure the account has access to the organization and repository.
      • Re‑select the organization and repository; the branch list should now populate correctly.
    4. If the problem persists for this app only, delete and recreate the Deployment Center configuration again after some time to clear any stale metadata.
    5. If multiple apps are affected or re‑authorization does not help, configure CI/CD from Azure DevOps Pipelines (using a Bitbucket service connection) instead of Deployment Center, because Deployment Center can keep stale repo URL metadata and fail to read branches.

    If none of the above resolves the issue, open a support ticket so that the backend configuration for the Deployment Center can be checked for an invalid or corrupted repo URL.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.