Azure DevOps (ADO) | Pipeline failure | Could not get the latest source version
I’ve created a new ADO project and configured a Pipeline to export Power Apps solution. While running the Pipeline it failed in immediately with following exception.
The pipeline is not valid. Could not get the latest source version for repository…
Reason:
- Under the ‘Get sources’ step of the Pipeline, ‘Default branch for manual and scheduled builds’ was auto selected as master.
- However my existing Branch Name was main.
What is the difference between master and main branches:
- In ADO, default ‘Branch Name’ used to be master until October 2020. Post that default ‘Branch Name’ changed to main.
- This Branch name change was not taken affect in Pipelines. New Pipeline defaults the Branch Name to master which is invalid. It has to be main.
- Refer this ADF product blog for more details.
Fix:
- In the ‘Get sources’ step of the pipeline, change the Default Branch from master to main.
- Save and Rerun the pipeline.
🙂
thanks rajiv for the good info