-
Bug
-
Resolution: Fixed
-
Major
Trying to run a build produces this error:
Connecting to https://github-enterprise.systems.uk.domain/api/v3 using ihubplegit/****** (github service account)Connecting to https://github-enterprise.systems.uk.domain/api/v3 using ihubplegit/****** (github service account)java.io.FileNotFoundException: https://github-enterprise.systems.uk.domain/api/v3/repos/org/repo/git/ref/heads/BRANCH-NAME 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.GitHubHttpUrlConnectionClient$HttpURLConnectionResponseInfo.bodyStream(GitHubHttpUrlConnectionClient.java:197) at org.kohsuke.github.GitHubResponse$ResponseInfo.getBodyAsString(GitHubResponse.java:321) at org.kohsuke.github.GitHubResponse.parseBody(GitHubResponse.java:85) at org.kohsuke.github.Requester.lambda$fetch$1(Requester.java:71) at org.kohsuke.github.GitHubClient.createResponse(GitHubClient.java:420) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:374)Caused: org.kohsuke.github.GHFileNotFoundException: https://github-enterprise.systems.uk.domain/api/v3/repos/org/repo/git/ref/heads/BRANCH-NAME {"message":"Not Found","documentation_url":"https://developer.github.com/enterprise/2.20/v3/git/refs/#get-a-single-reference"} at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:451) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:382) at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:326) at org.kohsuke.github.Requester.fetch(Requester.java:71) at org.kohsuke.github.GHRepository.getRef(GHRepository.java:1594) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1602) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428)Finished: FAILURE
The issue is that this URL https://github-enterprise.systems.uk.domain/api/v3/repos/org/repo/git/ref/heads/BRANCH-NAME doesn't exist.
Should be this URL https://github-enterprise.systems.uk.domain/api/v3/repos/org/repo/git/refs/heads/BRANCH-NAME
So Jenkins is using "ref" instead of "refs"