Title: Message Title
Tyler Esser updated an issue
Jenkins / JENKINS-53294
Pipeline build fails with GHFileNotFoundException not a user
Change By:
Tyler Esser
Pipeline build fails during permissions check (with trust level set to "From users with Admin or Write permission"). Seems to be caused by the git commit {{_user.name_}} not being a GitHub username.Expected results of a user not being a GitHub user is to fail the permissions trust check, but not the build. Failed build URL: [https://singleb.cse.ucdavis.edu/blue/organizations/jenkins/aspect/detail/PR-2533/13/pipeline]Build log:{noformat}Started by user tjesserConnecting to https://api.github.com using **/** (**)Connecting to https://api.github.com to check permissions of obtain list of hfmarkp for geodynamics/aspectGitHub has been notified of this commit's build resultjava.io.FileNotFoundException: https://api.github.com/repos/geodynamics/aspect/collaborators/hfmarkp/permission at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243) at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25) at org.kohsuke.github.Requester.parse(Requester.java:617) at org.kohsuke.github.Requester.parse(Requester.java:599) at org.kohsuke.github.Requester._to(Requester.java:277)Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"hfmarkp is not a user","documentation_url":"https://developer.github.com/v3/repos/collaborators/#review-a-users-permission-level"} at org.kohsuke.github.Requester.handleApiError(Requester.java:691) at org.kohsuke.github.Requester._to(Requester.java:298) at org.kohsuke.github.Requester.to(Requester.java:239) at org.kohsuke.github.GHRepository.getPermission(GHRepository.java:510) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource$DeferredPermissionsSource.fetch(GitHubSCMSource.java:2393) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSourceRequest.getPermissions(GitHubSCMSourceRequest.java:474) at org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission.checkTrusted(ForkPullRequestDiscoveryTrait.java:340) at org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait$TrustPermission.checkTrusted(ForkPullRequestDiscoveryTrait.java:323) at jenkins.scm.api.trait.SCMHeadAuthority.isTrusted(SCMHeadAuthority.java:101) at jenkins.scm.api.trait.SCMSourceRequest.isTrusted(SCMSourceRequest.java:215) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.getTrustedRevision(GitHubSCMSource.java:1540) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:99) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)Finished: FAILURE{noformat}