hudson.plugins.git.GitException: Could not checkout null with start point 58ef9bff662b45d099f0b7faba822661cbc144b6

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Sometimes when trying to build PR after GitHub hook has triggered, job fails while trying to checkout non-existent commit: {quote} 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: 58ef9bff662b45d099f0b7faba822661cbc144b6 at 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 {quote} 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.
    via by Mihails Strasuns,
  • Sometimes when trying to build PR after GitHub hook has triggered, job fails while trying to checkout non-existent commit: {quote} 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: 58ef9bff662b45d099f0b7faba822661cbc144b6 at 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 {quote} 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.
    via by Mihails Strasuns,
  • GitHub comment 53#69847843
    via GitHub by stfeng
    ,
  • The error shows as below after set the *Branch name* from *Additional Behaviours* -> *Check out to specific local branch*. {noformat} > git config core.sparsecheckout > git checkout -f 0bd22591afff0f67e84f9ce97365e1772351b3ce > git branch -a > git rev-parse (detached from 0bd2259)^{commit} FATAL: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce hudson.plugins.git.GitException: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1497) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:896) at hudson.model.AbstractProject.checkout(AbstractProject.java:1252) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513) at hudson.model.Run.execute(Run.java:1710) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: hudson.plugins.git.GitException: Command "git rev-parse (detached from 0bd2259)^{commit}" returned status code 128: stdout: (detached from 0bd2259)^{commit} stderr: fatal: ambiguous argument '(detached from 0bd2259)^{commit}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' {noformat} Full Jenkins Console Output has been attached (Jenkins-Git-failed-full-log.txt). After analyzed, the error is because of the *specified colors* set in the ~/.gitconfig. The color settings as blow, details can be found from [my github|https://github.com/Marslo/LinuxStuff/blob/master/Configs/HOME/Git/.gitconfig#L23]: {noformat} [color] ui = true log = always status = always add = always push = always pull = always diff = always branch = always interactive = auto [color "branch"] current = green bold local = yellow remote = red [color "status"] added = yellow changed = red bold untracked = magenta normal dim [color "diff"] meta = blue bold frag = magenta old = red bold new = green bold whitespace = red reverse {noformat} Here the Jenkins job setting: !git-plugin.png! Can git plugin "ignore" the settings automatically (the settings like colors). I've [Created a question in stackoverflow|http://stackoverflow.com/questions/24118259/how-can-jenkins-ignore-the-color-settings-in-gitconfig-by-using-git-plugin]
    via by Marslo Jiao,
  • Git plugin is unable to checkout the current version in ist workspace: Baue in Arbeitsbereich D:\jenkins\jobs\theproject\workspace > git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git.exe config remote.origin.url git@gitcentral:/gitrepo/theproject.git # timeout=10 Fetching upstream changes from git@gitcentral:/gitrepo/theproject.git > git.exe --version # timeout=10 using GIT_SSH to set credentials > git.exe -c core.askpass=true fetch --tags --progress git@gitcentral:/gitrepo/theproject.git +refs/heads/*:refs/remotes/origin/* > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10 > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 Checking out Revision 4ee382f1cad8053031c96f90281f4d85da6cdbb9 (refs/remotes/origin/master) > git.exe config core.sparsecheckout # timeout=10 > git.exe checkout -f 4ee382f1cad8053031c96f90281f4d85da6cdbb9 FATAL: Could not checkout 4ee382f1cad8053031c96f90281f4d85da6cdbb9 hudson.plugins.git.GitException: Could not checkout 4ee382f1cad8053031c96f90281f4d85da6cdbb9 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1907) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1060) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.plugins.git.GitException: Command "git.exe checkout -f 4ee382f1cad8053031c96f90281f4d85da6cdbb9" returned status code 128: stdout: stderr: *fatal: unable to join threaded lstat* at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:62) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1899) ... 10 more Finished: FAILURE From the Windows cmd prompt git status produces the same error: D:\jenkins\jobs\theproject\workspace>git status fatal: unable to join threaded lstat However when running git status from the gitbash shell this error does not occur. $ git version git version 2.6.3.windows.1 The repository size is ~230 MB
    via by Alexander Veit,
    • 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: 58ef9bff662b45d099f0b7faba822661cbc144b6 at 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

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    2 more bugmates