[JENKINS-53294] Pipeline build fails with GHFileNotFoundException not a user
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 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:
Started by user tjesser
Connecting to https://api.github.com using ******/****** (******)
Connecting to https://api.github.com to check permissions of obtain list of hfmarkp for geodynamics/aspect
GitHub has been notified of this commit's build result
java.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
Originally reported by tjesser, imported from: Pipeline build fails with GHFileNotFoundException not a user
- assignee:
lanwen
- status: Open
- priority: Minor
- component(s): github-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 2025-12-08
Raw content of original issue
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 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:
Started by user tjesser Connecting to https://api.github.com using ******/****** (******) Connecting to https://api.github.com to check permissions of obtain list of hfmarkp for geodynamics/aspect GitHub has been notified of this commit's build result java.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
environment
Kubernetes cluster - Helm install : stable/jenkins<br/>
- jenkins/jenkins:2.138<br/>
- jenkins/jnlp-slave:3.23-1<br/>
- blueocean:1.8.2<br/>
- kubernetes:1.12.3<br/>
- workflow-aggregator:2.5<br/>
- xunit:2.2.3