hudson.plugins.git.GitException

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.

  • GitHub comment 29139#233489930
    via GitHub by bprashanth
    ,
  • h5. Steps to reproduce the bug With a job associated to a PR (previously indexed) and everything (credentials, webhooks, etc) configured in a right way... # Push a new commit to the PR. It will build successfully. # Push a new commit to the {{master}} branch (I'm supossing that the PR was done against this branch). # Close and open the PR. The PR won't be built because there are not changes in the PR. # Press on "Build Now" and .... {noformat} Started by user anonymous Connecting to GitHub using recena/****** (30a07b2797849568e92313249f082c813566df38) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from 2 remote Git repositories > git config remote.origin.url https://github.com/recena/test-private.git # timeout=10 Fetching upstream changes from https://github.com/recena/test-private.git > git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.username recena # timeout=10 > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git2629912066994054356.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git config remote.origin1.url https://github.com/recena/test-private.git # timeout=10 Fetching upstream changes from https://github.com/recena/test-private.git using .gitcredentials to set credentials > git config --local credential.username recena # timeout=10 > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git4925866332964316725.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/pull/*/merge:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 Checking out Revision e6cf85ada16bf5718e81add62576751155aeeab3 (PR-1) > git config core.sparsecheckout # timeout=10 > git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3 GitHub has been notified of this commit’s build result hudson.plugins.git.GitException: Could not checkout e6cf85ada16bf5718e81add62576751155aeeab3 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1081) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:109) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:87) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Caused by: hudson.plugins.git.GitException: Command "git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3" returned status code 128: stdout: stderr: fatal: reference is not a tree: e6cf85ada16bf5718e81add62576751155aeeab3 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1710) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1975) ... 7 more Finished: FAILURE {noformat}
    via by Manuel Recena Soto,
  • h3. How to reproduce (Assuming you have a GitHub Organization folder with WebHooks already setup) 1. Fork a repo 2. Create a branch 3. Make a change 4. Make a commit 5. Create a pull request against the remote master 6. Commit successively multiple changes very quickly - 2/3 seconds interval (Usually 5 commit suffice) 7. You should see the PR build failing with the following exception: {code} hudson.plugins.git.GitException: Could not checkout 67615299b8ef9ae83a60c72af7ca37cbfc879d4f at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:109) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:87) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.plugins.git.GitException: Command "git checkout -f 67615299b8ef9ae83a60c72af7ca37cbfc879d4f" returned status code 128: stdout: stderr: fatal: reference is not a tree: 67615299b8ef9ae83a60c72af7ca37cbfc879d4f at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1984) ... 7 more Finished: FAILURE {code} h3. Example Following have been committed within 10 seconds in that order: 1. 4fba098fd8127befb73e751f58d31129abfec323 2. 84765a178a5516dbabfb9d0cbf17ee08129a00c4 -> triggered branch indexing 3. 67615299b8ef9ae83a60c72af7ca37cbfc879d4f Checking in the indexing logs, the Branch Indexing detected changes for PR-13, sha _84765a178a5516dbabfb9d0cbf17ee08129a00c4_: {code} Changes detected in PR-13 (12d4896a25dcf71c7febc379f55e84841c4dde69 → 84765a178a5516dbabfb9d0cbf17ee08129a00c4) Scheduled build for branch: PR-13 {code} The next indexing logs, probably triggered by 67615299b8ef9ae83a60c72af7ca37cbfc879d4f, shows: {code} No changes detected in PR-13 (still at 84765a178a5516dbabfb9d0cbf17ee08129a00c4) {code}
    via by Allan BURDAJEWICZ,
  • [JIRA] (JENKINS-36137) Possible issue on rebase/amend of a pull request
    via by in...@giorgiosironi.com (JIRA),
  • After rebasing this pull request: https://github.com/elifesciences/api-sdk-php/pull/1 I got the following error in the build triggered by the webhook: {code:bash} Branch indexing Connecting to https://api.github.com using elife-alfred-user/****** (Used for listing branches in Multibranch pipelines) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from 2 remote Git repositories > git config remote.origin.url https://github.com/elifesciences/api-sdk-php.git # timeout=10 Fetching upstream changes from https://github.com/elifesciences/api-sdk-php.git > git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.username elife-alfred-user # timeout=10 > git config --local credential.helper store --file=/tmp/git290847354312573576.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/api-sdk-php.git +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git config remote.origin1.url https://github.com/elifesciences/api-sdk-php.git # timeout=10 Fetching upstream changes from https://github.com/elifesciences/api-sdk-php.git using .gitcredentials to set credentials > git config --local credential.username elife-alfred-user # timeout=10 > git config --local credential.helper store --file=/tmp/git1965350685167259234.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/api-sdk-php.git +refs/pull/*/merge:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 Checking out Revision d4f40697f8b8d693928c89d55e11823b73b9c049 (PR-1) > git config core.sparsecheckout # timeout=10 > git checkout -f d4f40697f8b8d693928c89d55e11823b73b9c049 GitHub has been notified of this commit’s build result hudson.plugins.git.GitException: Could not checkout d4f40697f8b8d693928c89d55e11823b73b9c049 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1135) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: hudson.plugins.git.GitException: Command "git checkout -f d4f40697f8b8d693928c89d55e11823b73b9c049" returned status code 128: stdout: stderr: fatal: reference is not a tree: d4f40697f8b8d693928c89d55e11823b73b9c049 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1984) ... 7 more Finished: FAILURE {code} I could find no trace of this sha (d4f406) in the workspace PR-1@script, so it may have been one pointing to the code before the amend; but I'm aware that Jenkins creates a new commit merging the PR code onto master, so it may be normal that I cannot find it. I tried to reproduce this behavior by amending a commit on another pull request, but it worked and the amended commit was even shown in the Changes page. Any clue to what happened?
    via by Giorgio Sironi,
  • [JIRA] (JENKINS-36655) Pull request build stuck on not existent commit
    via by in...@giorgiosironi.com (JIRA),
  • h5. Steps to reproduce the bug With a job associated to a PR (previously indexed) and everything (credentials, webhooks, etc) configured in a right way... # Push a new commit to the PR. It will build successfully. # Push a new commit to the {{master}} branch (I'm supossing that the PR was done against this branch). # Close and open the PR. The PR won't be built because there are not changes in the PR. # Press on "Build Now" and .... {noformat} Started by user anonymous Connecting to GitHub using recena/****** (30a07b2797849568e92313249f082c813566df38) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from 2 remote Git repositories > git config remote.origin.url https://github.com/recena/test-private.git # timeout=10 Fetching upstream changes from https://github.com/recena/test-private.git > git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.username recena # timeout=10 > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git2629912066994054356.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git config remote.origin1.url https://github.com/recena/test-private.git # timeout=10 Fetching upstream changes from https://github.com/recena/test-private.git using .gitcredentials to set credentials > git config --local credential.username recena # timeout=10 > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git4925866332964316725.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/pull/*/merge:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 Checking out Revision e6cf85ada16bf5718e81add62576751155aeeab3 (PR-1) > git config core.sparsecheckout # timeout=10 > git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3 GitHub has been notified of this commit’s build result hudson.plugins.git.GitException: Could not checkout e6cf85ada16bf5718e81add62576751155aeeab3 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1081) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:109) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:87) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) Caused by: hudson.plugins.git.GitException: Command "git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3" returned status code 128: stdout: stderr: fatal: reference is not a tree: e6cf85ada16bf5718e81add62576751155aeeab3 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1710) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1975) ... 7 more Finished: FAILURE {noformat}
    via by Manuel Recena Soto,
  • Some commits were added to a pull request which was building, bringing it from a diff of 2 commits to 5 commits on top of master. The build of the pull request by the Organization Folder plugin was made over the commit resulting from the merge of the 2nd commit onto master. After this commit was garbage-collected by Github (it's not in the repository anymore), the build failed: {code:java} Started by user Giorgio Sironi Connecting to https://api.github.com using elife-alfred-user/****** (Access to Github as elife-alfred-user. Used e.g. for listing branches in Organization folder) > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from 2 remote Git repositories > git config remote.origin.url https://github.com/elifesciences/pattern-library.git # timeout=10 Fetching upstream changes from https://github.com/elifesciences/pattern-library.git > git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.username elife-alfred-user # timeout=10 > git config --local credential.helper store --file=/tmp/git4178245349311672378.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/pattern-library.git +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git config remote.origin1.url https://github.com/elifesciences/pattern-library.git # timeout=10 Fetching upstream changes from https://github.com/elifesciences/pattern-library.git using .gitcredentials to set credentials > git config --local credential.username elife-alfred-user # timeout=10 > git config --local credential.helper store --file=/tmp/git1174167449186412605.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/elifesciences/pattern-library.git +refs/pull/*/merge:refs/remotes/origin/pr/* > git config --local --remove-section credential # timeout=10 Checking out Revision e82306057bb9fe98e714b854965cc348e8e2f2af (PR-270) > git config core.sparsecheckout # timeout=10 > git checkout -f e82306057bb9fe98e714b854965cc348e8e2f2af GitHub has been notified of this commit’s build result hudson.plugins.git.GitException: Could not checkout e82306057bb9fe98e714b854965cc348e8e2f2af at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1117) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:85) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: hudson.plugins.git.GitException: Command "git checkout -f e82306057bb9fe98e714b854965cc348e8e2f2af" returned status code 128: stdout: stderr: fatal: reference is not a tree: e82306057bb9fe98e714b854965cc348e8e2f2af at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1984) ... 7 more Finished: FAILURE {code} This is fine: it can't build not existent code. The strange thing was that no matter how I re-index the branches, and delete the related workspaces, still every build triggered by pressing Build Now on this PR will be stuck on this commit. Where this information is stored and how can I reset it?
    via by Giorgio Sironi,
    • hudson.plugins.git.GitException: Could not checkout ddd9a8b6f884a020b38dfcfbfa86878955fc95a4 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1992)
    No Bugmate found.