Scenario: When a PR is created in GitHub, it will trigger a Jenkins Multibranch pipeline to execute CI for the fork and will post the Jenkins job status on GitHub PR page for that fork.
Jenkins job is getting triggered automatically with the help of GitHub personal access tokens and Webhook. But Jenkins job status is not shown/posted anywhere on GitHub. Getting below error:
"Could not update commit status, please check if your scan credentials belong to a member of the organization or a collaborator of the repository and repo:status scope is selected GitHub has been notified of this commit’s build result"
Tried to post status using "GitHub autostatus" plugin, as per console output, getting below:
Console output snippet
Tried ignoring GitHub Hooks problems and others. Note: I am admin of the repo, still facing this issue.
You can see the overall state of the last commit to a branch on your repository's branches page or in your repository's list of pull requests. If status checks are required for a repository, the required status checks must pass before you can merge your branch into the protected branch.
Your GitHub repository is integrated with your Jenkins project. With this Jenkins GitHub integration, you can now use any file found in the GitHub repository and trigger the Jenkins job to run with every code commit.
I'm the author of the Github Autostatus plugin.
I think the problem is that whichever user ID Jenkins is using to run the job needs to be added to your github repo as a collaborator. If you open "Configure" from the project in Jenkins representing your github org, you should have a user configured that has access to github, e.g.
That user needs access to your repo - the easiest way to do that is add them as a collaborator in github
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With