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

Community site session details

Session Id : jWYoWb9xTz2kU2oPT7W9Gl
Power Apps - Power Apps Pro Dev & ISV
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 11 Jan 2023 03:10:17 by

Hi all,

This is a relatively simple issue, but I am not able to solve it in the pipeline.

I am running the following command line script to save exported dataverse solution in repo.

 

git config user.email "email address removed for privacy reasons"
git config user.name "User1"
git checkout main
git pull
git add --all
git commit -m "Test solution 1"
echo push code to new repo
git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin main -f

 

But the 'git checkout' is giving the following error: pathspec 'main' did not match any file(s) known to git

 

I am already on the main branch. I tried from git bash via my local machine and the commit works fine from there. But the pipeline action gives the above error. 

 

Is this something related to the permission settings for the repo or the user?

 

Thanks in advance

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete