I have an Azure DevOps pipeline that creates a GitHub release using the GitHubRelease Task. However, while creating a release, GitHubRelease task failed with the following error:

##[error]An unexpected error occurred while creating the release.
##[error]Error: Not Found

In my scenario, the issue was caused by a lack of permissions for the Service Connection the GitHubRelease task was running under.

To understand and fix the issue, the following approach helped me troubleshoot:

Troubleshooting steps:

  • Add a new system.debug pipeline variable to the pipeline and set it to true.
  • Rerun the pipeline, and you should now see more detailed logs.
  • From the error log, I noticed that the Service Connection under which the GitHubRelease task was running lacked the required privileges.
  • Since I was using a PAT token to create my Service Connection, I ensured that the following highlighted scopes were granted, which resolved the issue.

🙂

Advertisements
Advertisements

Leave a comment