Introduction
A couple of days ago I was creating a new Azure DevOps Pipeline based on an existing yaml file. That yaml extracts a Power Platform solution and pushes it to an Azure DevOps Git repo thanks to a command line step. All I had to do was adding a couple of variables to make that pipeline work, at least that was what I thought.
Unfortunately the pipeline first run failed with the following error:
error: src refspec master does not match any
I then spent way too much time to my liking figuring out what was wrong in my pipeline considering I was using an existing yaml file that was actually working in other pipelines. Here is what I found.
Fixing the shallow fetch option
Edit your pipeline and open the triggers configuration:
Then navigate to the “Yaml” tab, select the “Get sources” step, scroll down and uncheck the “Shallow fetch” option:
Your pipeline should now be working fine.