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.

🙂

Advertisements
Advertisements

Leave a comment

Visitors

2,098,135 hits

Top Posts