Jenkins job status on GitHub
Jenkins job status on GitHub
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.
1 Answer
1
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
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Thanks, it was resolved earlier. I missed to update the question.
– user9931563
Sep 3 at 15:24