-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Linux
Sometimes when trying to build PR after GitHub hook has triggered, job fails while trying to checkout non-existent commit:
Cloning the remote Git repository
Cloning repository <private repo>
Fetching upstream changes from <private repo>
using GIT_SSH to set credentials GitHub jenkins-admin
Fetching upstream changes from <private repo>
using GIT_SSH to set credentials GitHub jenkins-admin
Checking out Revision 58ef9bff662b45d099f0b7faba822661cbc144b6 (detached)
FATAL: Could not checkout null with start point 58ef9bff662b45d099f0b7faba822661cbc144b6
hudson.plugins.git.GitException: Could not checkout null with start point 58ef9bff662b45d099f0b7faba822661cbc144b6
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1448)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:896)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
at hudson.model.Run.execute(Run.java:1665)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:246)
Caused by: hudson.plugins.git.GitException: Command "git checkout -f 58ef9bff662b45d099f0b7faba822661cbc144b6" returned status code 128:
stdout:
stderr: fatal: reference is not a tree: 58ef9bff662b45d099f0b7faba822661cbc144b6at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1253)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1249)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1065)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1075)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1443)
... 9 more
Launching parametrised build with manually defined ${sha1} always runs fine for same PR's. Exact trigger criteria is unclear but it seems to be related to force pushed to PR branch.
- is blocking
-
JENKINS-10385 FATAL: Could not checkout null with start point after a reset --hard to remove a commit
-
- Open
-
- is related to
-
JENKINS-26748 Git plugin sometimes reports Could not checkout null with start point <SHA1>
-
- Closed
-
I can reproduce this easily now, is that, pushing --force to a PR that's being tested already in Jenkins.
A simple test is just have a dummy project, which just a build script that is a sleep 60.
Then create a PR, wait until jenkins runs the job to build it, while is at it, do a git rebase --force HEAD^ to the project and push --force to the PR branch and boom!
If configurations are really a problem or not needs to be confirmed still, I'll do that as soon as possible.