jenkinsci / jenkinsci/git-plugin
[JENKINS-10385] FATAL: Could not checkout null with start point after a reset --hard to remove a commit
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
This morning, we accidentally merged (on github' UI) one pull request to social client master. When I realized that, I reset --hard to the commit that is before the mis-merged commit and then force push (rewrite commit history).
After that, we met this problem:
- The mis-merged commit is still there: https://ci.exoplatform.org/job/social-client-master-ci/changes SCL-14 | Switch to use TestNG instead of JUnit (commit: ad11e95eba2343fb8c14c04be981f74bc3035465) — hoatlevan / detail
- failed build with this: https://ci.exoplatform.org/view/%C2%B0%20IT%20%C2%B0/job/social-client-master-it/42/
This is a matrix build. The parent went fineStarted by upstream project "social-client-master-ci" build number 31
Building on master
Checkout:workspace / /home/swfhudson/data/jobs/social-client-master-it/workspace - hudson.remoting.LocalChannel@129a4ed
Using strategy: Default
Last Built Revision: Revision a63d278c2c0c2999b7686e86e4759bc4be902bb1 (origin/master)
Checkout:workspace / /home/swfhudson/data/jobs/social-client-master-it/workspace - hudson.remoting.LocalChannel@129a4ed
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/exosocial/exo.social.client.git
Pruning obsolete local branches
Commencing build of Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Checking out Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Cleaning workspace
Triggering 1.2.1-SNAPSHOT
Triggering 1.2.0-GA
Triggering 1.3.0-SNAPSHOT
Interrupting #42
Finished: FAILUREBut children builds failed, for example : https://ci.exoplatform.org/job/social-client-master-it/42/social.server.version=1.2.0-GA/console
Started by upstream project "social-client-master-it" build number 42
Building on master
Checkout:1.2.0-GA / /home/swfhudson/data/jobs/social-client-master-it/workspace/social.server.version/1.2.0-GA - hudson.remoting.LocalChannel@129a4ed
Using strategy: Default
Last Built Revision: Revision a63d278c2c0c2999b7686e86e4759bc4be902bb1 (origin/master)
Checkout:1.2.0-GA / /home/swfhudson/data/jobs/social-client-master-it/workspace/social.server.version/1.2.0-GA - hudson.remoting.LocalChannel@129a4ed
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from https://github.com/exosocial/exo.social.client.git
Cleaning workspace
Commencing build of Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Checking out Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Cleaning workspace
FATAL: Could not checkout null with start point 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
hudson.plugins.git.GitException: Could not checkout null with start point 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:831)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1143)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1127)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1127)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:555)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:443)
at hudson.model.Run.run(Run.java:1376)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Caused by: hudson.plugins.git.GitException: Error performing command: git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
Command "git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135" returned status code 128: fatal: reference is not a tree: 44bdde2ce4035bfd5fca0f81c18cd4d070f12135at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:744)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:709)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:719)
at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:818)
... 12 more
Caused by: hudson.plugins.git.GitException: Command "git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135" returned status code 128: fatal: reference is not a tree: 44bdde2ce4035bfd5fca0f81c18cd4d070f12135at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:739)
... 15 more
---
Originally reported by
aheritier, imported from: FATAL: Could not checkout null with start point after a reset --hard to remove a commit
Raw content of original issue
This morning, we accidentally merged (on github' UI) one pull request to social client master. When I realized that, I reset --hard to the commit that is before the mis-merged commit and then force push (rewrite commit history).
After that, we met this problem:
- The mis-merged commit is still there: https://ci.exoplatform.org/job/social-client-master-ci/changes SCL-14 | Switch to use TestNG instead of JUnit (commit: ad11e95eba2343fb8c14c04be981f74bc3035465) — hoatlevan / detail
- failed build with this: https://ci.exoplatform.org/view/%C2%B0%20IT%20%C2%B0/job/social-client-master-it/42/
This is a matrix build. The parent went fineStarted by upstream project "social-client-master-ci" build number 31
Building on master
Checkout:workspace / /home/swfhudson/data/jobs/social-client-master-it/workspace - hudson.remoting.LocalChannel@129a4ed
Using strategy: Default
Last Built Revision: Revision a63d278c2c0c2999b7686e86e4759bc4be902bb1 (origin/master)
Checkout:workspace / /home/swfhudson/data/jobs/social-client-master-it/workspace - hudson.remoting.LocalChannel@129a4ed
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/exosocial/exo.social.client.git
Pruning obsolete local branches
Commencing build of Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Checking out Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Cleaning workspace
Triggering 1.2.1-SNAPSHOT
Triggering 1.2.0-GA
Triggering 1.3.0-SNAPSHOT
Interrupting #42
Finished: FAILUREBut children builds failed, for example : https://ci.exoplatform.org/job/social-client-master-it/42/social.server.version=1.2.0-GA/console
Started by upstream project "social-client-master-it" build number 42
Building on master
Checkout:1.2.0-GA / /home/swfhudson/data/jobs/social-client-master-it/workspace/social.server.version/1.2.0-GA - hudson.remoting.LocalChannel@129a4ed
Using strategy: Default
Last Built Revision: Revision a63d278c2c0c2999b7686e86e4759bc4be902bb1 (origin/master)
Checkout:1.2.0-GA / /home/swfhudson/data/jobs/social-client-master-it/workspace/social.server.version/1.2.0-GA - hudson.remoting.LocalChannel@129a4ed
Cloning the remote Git repository
Cloning repository origin
Fetching upstream changes from https://github.com/exosocial/exo.social.client.git
Cleaning workspace
Commencing build of Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Checking out Revision 44bdde2ce4035bfd5fca0f81c18cd4d070f12135 (origin/master)
Cleaning workspace
FATAL: Could not checkout null with start point 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
hudson.plugins.git.GitException: Could not checkout null with start point 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:831)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1143)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1127)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1127)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:555)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:443)
at hudson.model.Run.run(Run.java:1376)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Caused by: hudson.plugins.git.GitException: Error performing command: git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135
Command "git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135" returned status code 128: fatal: reference is not a tree: 44bdde2ce4035bfd5fca0f81c18cd4d070f12135at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:744)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:709)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:719)
at hudson.plugins.git.GitAPI.checkoutBranch(GitAPI.java:818)
... 12 more
Caused by: hudson.plugins.git.GitException: Command "git checkout -f 44bdde2ce4035bfd5fca0f81c18cd4d070f12135" returned status code 128: fatal: reference is not a tree: 44bdde2ce4035bfd5fca0f81c18cd4d070f12135at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:739)
... 15 more
- environment:
Jenkins 1.421 + git plugin 1.1.10
Contributor guide
Assessment
This issue has not been assessed yet.