Reputation: 2140
I'm using https://github.com/jenkinsci/ghprb-plugin plugin for my Jenkins to initiate job build when pull request is raised. I'm getting below error "Unable to connect to GitHub API: org.kohsuke.github.HttpException: {"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/users#get-the-authenticated-user"}"
Tried with multiple user on 2 different Jenkins, issue remains same.
Upvotes: 3
Views: 689
Reputation: 389
Right now you are using github username and password. But you need to use github access token instead of password for authentication. You can create an access token from settings -> Developer Settings -> Personal Access tokens -> Generate new token
.
Upvotes: 3