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:
- We used a git PAT token to connect to Git from Azure DevOps and configured the Service Connection as shown below.

- 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.
🙂
![[Step by Step] Configure and run 'Pipelines in Power Platform'](https://rajeevpentyala.com/wp-content/uploads/2024/08/image.png)

![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)
Leave a comment