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.

  • Not sure if this affects production systems, or indeed why it is not reported by _everyone_, but anyway I was unable to make {{AbstractGitSCMSource.retrieve(SCMHeadObserver, TaskListener)}} work in a test without this fix. (And there was no test for it.) Doing so failed with: {code:none} hudson.plugins.git.GitException: Could not init $JENKINS_HOME/caches/git-4ab... at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init(CliGitAPIImpl.java:181) at hudson.plugins.git.GitAPI.init(GitAPI.java:217) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:275) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:147) at jenkins.scm.api.SCMSource.retrieve(SCMSource.java:231) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:176) at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveHeads(AbstractGitSCMSourceTest.java:74) at ... Caused by: hudson.plugins.git.GitException: Error performing command: git init $JENKINS_HOME/caches/git-4ab... at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1726) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1691) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1321) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:654) ... 34 more Caused by: java.io.IOException: Cannot run program "git" (in directory "$JENKINS_HOME/caches/git-4ab..."): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:803) at hudson.Launcher$ProcStarter.start(Launcher.java:381) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1715) ... 38 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 43 more {code} Perhaps some, but not all, versions of {{git-client}} barf if you try to run {{git init}} in a nonexistent directory?
    via by Jesse Glick,
  • Jenkins Changelog for Git tags
    via Stack Overflow by Simon Hardman
    ,
  • C# (dbg) not building on Linux
    via GitHub by sreecha
    ,
  • I'm looking into migrating from subversion to git, so I've created a git playpen and I'm trying to build it. The clone went well enough, but after committing a change, I get the following error determining the change set (which is exactly one file in this case). Checking out Revision d90fbc8159fcfe465fad42c4af4c5b502111e709 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10 > git rev-list d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10 git whatchanged --no-abbrev -M --format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(76,4,4)%s%n%n%b -n 1024 d90fbc8159fcfe465fad42c4af4c5b502111e709 ^d90fbc8159fcfe465fad42c4af4c5b502111e709 fatal: invalid --pretty format: commit ERROR: Unable to retrieve changeset hudson.plugins.git.GitException: Error launching git whatchanged at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:765) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at ......remote call to doug-rhel7-base(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:778) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy54.execute(Unknown Source) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1148) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1069) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) [EnvInject] - Executing scripts and injecting environment variables after the SCM step.
    via by Douglas Seay,
  • I'm looking into migrating from subversion to git, so I've created a git playpen and I'm trying to build it. The clone went well enough, but after committing a change, I get the following error determining the change set (which is exactly one file in this case). Checking out Revision d90fbc8159fcfe465fad42c4af4c5b502111e709 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10 > git rev-list d90fbc8159fcfe465fad42c4af4c5b502111e709 # timeout=10 git whatchanged --no-abbrev -M --format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(76,4,4)%s%n%n%b -n 1024 d90fbc8159fcfe465fad42c4af4c5b502111e709 ^d90fbc8159fcfe465fad42c4af4c5b502111e709 fatal: invalid --pretty format: commit ERROR: Unable to retrieve changeset hudson.plugins.git.GitException: Error launching git whatchanged at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:765) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at ......remote call to doug-rhel7-base(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:778) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy54.execute(Unknown Source) at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1148) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1069) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1277) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:381) [EnvInject] - Executing scripts and injecting environment variables after the SCM step.
    via by Douglas Seay,
    • hudson.plugins.git.GitException: Could not init $JENKINS_HOME/caches/git-4ab... at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init(CliGitAPIImpl.java:181) at hudson.plugins.git.GitAPI.init(GitAPI.java:217) at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:275) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:147) at jenkins.scm.api.SCMSource.retrieve(SCMSource.java:231) at jenkins.scm.api.SCMSource.fetch(SCMSource.java:176) at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveHeads(AbstractGitSCMSourceTest.java:74)
    No Bugmate found.