-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins 2.150.1 LTS
The git tag was firstly pushed to GitHub and the commits are pushed later.
"Fetch Tags" is already enabled, However, Jenkins failed to get updated tag metadata through the GitHub API.
This also happens when we re-tag a tag and force pushed to GitHub to rewrite the commit.
We tried to use cURL with the same credential to get the tag via the GitHub API and which works fine, we got the correct tag response.
However, Jenkins still failed to the tag data. It seems like Jenkins cached the API response and didn't invalidate the cache.
14:36:53 Connecting to https://api.github.com using myuser/****** (myuser-github username/password with personal token)java.io.FileNotFoundException:https://api.github.com/repos/xxxxxxxxxx/xxxxxxxx/git/refs/tags/v0.13.3 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:625) at org.kohsuke.github.Requester.parse(Requester.java:607) at org.kohsuke.github.Requester._to(Requester.java:285) Caused: org.kohsuke.github.GHFileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3/git/refs/#get-a-reference"} at org.kohsuke.github.Requester.handleApiError(Requester.java:699) at org.kohsuke.github.Requester._to(Requester.java:306) at org.kohsuke.github.Requester.to(Requester.java:247) at org.kohsuke.github.GHRepository.getRef(GHRepository.java:891) at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1457) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:583) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:95) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
- is related to
-
JENKINS-54403 Job fail when GitHub tag was recreated
- Closed