Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:
  • tech-44 Profile Picture
    39 on at
    Re: Azure DevOps Power Platform pipeline Error

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

  • dibeau Profile Picture
    26 on at
    Re: Azure DevOps Power Platform pipeline Error

    Everything worked as intended with the solution Sundeep suggested. 

     

    Thanks a lot @Sundeep_Malik!

  • dibeau Profile Picture
    26 on at
    Re: Azure DevOps Power Platform pipeline Error

    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.

  • Verified answer
    Sundeep_Malik Profile Picture
    6,480 on at
    Re: Azure DevOps Power Platform pipeline Error

    @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. 🙂

  • Sundeep_Malik Profile Picture
    6,480 on at
    Re: Azure DevOps Power Platform pipeline Error

    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 

     

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard