hudson.plugins.git.GitException: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce

Jenkins JIRA | Marslo Jiao | 2 years ago
  1. 0

    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]

    Jenkins JIRA | 2 years ago | Marslo Jiao
    hudson.plugins.git.GitException: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce
  2. 0

    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]

    Jenkins JIRA | 2 years ago | Marslo Jiao
    hudson.plugins.git.GitException: Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce
  3. 0

    Fail to checkout PR when a push -f is done to the PR while is being already built

    GitHub | 3 years ago | leandro-lucarella-sociomantic
    hudson.plugins.git.GitException: Could not checkout null with start point 0c2e9e245bd8d7329c3d8b91013d806f4b112687
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Merge Request from Gitlab does not Merge but Checkout

    GitHub | 1 year ago | AndreasBoehme
    hudson.plugins.git.GitException: Could not checkout a15f43ab9677d5e2273a3d64d8e4e3be2e2d8ad5
  6. 0

    GitHub comment 53#69847843

    GitHub | 2 years ago | stfeng
    hudson.plugins.git.GitException: Could not checkout null with start point 9abde66c14d937b2c8f041a32a9a4bbbb44cd96c

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Could not checkout HEAD with start point 0bd22591afff0f67e84f9ce97365e1772351b3ce

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute()
    2. org.jenkinsci.plugins
      CliGitAPIImpl$8.execute
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$8.execute(CliGitAPIImpl.java:1497)
      1 frame
    3. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.checkout(GitSCM.java:896)
      1 frame
    4. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
      2 frames
    5. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    6. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:513)
      2. hudson.model.Run.execute(Run.java:1710)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:88)
      5. hudson.model.Executor.run(Executor.java:231)
      5 frames