We have an Azure DevOps pipeline, and in one of the steps (see below), we trigger the git checkout command.

We began encountering the following fatal error.

fatal: 'origin/main' is not a commit and a branch 'main' cannot be created from it

Reason and Fix:

  • The pipeline was configured to run using the Service Connection mentioned above.
  • As for the error, it occurred due to an expired PAT token. Providing a valid PAT token and rerunning the pipeline resolved the issue.

🙂

Leave a Reply

Discover more from Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

Subscribe now to keep reading and get access to the full archive.

Continue reading