web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Azure DevOps Power Pla...
Power Apps
Answered

Azure DevOps Power Platform pipeline Error

(0) ShareShare
ReportReport
Posted on by 26

Hi all

 

I am having trouble with getting a pipeline run without errors. I'm trying to run a job wich uses the Power Platform Build Tools to export, unpack and push the code of a solution to an Azure DevOps repo. 

I'm following the example of Suparna Banerjee in Quick Wins I Set up Azure DevOps Pipelines for Power Platform - YouTube

 

While trying I keep getting the following errors executing the last step (CMD Line Script);

 

error: pathspec 'main' did not match any file(s) known to git

error: src refspec main does not match any
error: failed to push some refs to '**'
##[error]Cmd.exe exited with code '1'. 
 
The script (** = made unreadable):
echo commit all changes
git config user.email "**"
git config user.name "**"
git checkout main
git add --all
git commit -m "solution init"
echo push code to new repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main
 
Some help would be appreciated a lot. Thanks in advance!
 
DiBeau
 
Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,501 on at

    Following post, getting the same error. 

    For me I just removed the last line for temporary purposes. Because of which it did not create any folder in the repository. Though I was able to transfer solution from one environment to another after removing the last line. 

    But definitely I will adding the last line to create the repository in the future. But I hope till then I will get the permanent solution for it. 

    Tagging person who might be able to help. 

    @mdevaney 

     

     

  • Verified answer
    Sundeep_Malik Profile Picture
    6,501 on at

    @dibeau 

     

    Try this, not sure it would work or not

    In the 4th line of the code do this:

     

    git checkout -b main

    It worked for me. Do come back if it works. 🙂

  • dibeau Profile Picture
    26 on at

    Hi Sundeep

     

    Thanks for helping out! Looks like 'git checkout -b main' worked. I've run the pipeline succesfully now and am seeing the solution files in my repo.

     

    I'll try and do the other pipelines now. I'll let you know how that went.

  • dibeau Profile Picture
    26 on at

    Everything worked as intended with the solution Sundeep suggested. 

     

    Thanks a lot @Sundeep_Malik!

  • tech-44 Profile Picture
    39 on at

    I think Azure DevOps Power Platform pipeline errors can occur when there is incorrect input data, or the pipeline is running too slowly.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard