hudson.plugins.git.GitException: Could not init $JENKINS_HOME/caches/git-4ab...

Jenkins JIRA | Jesse Glick | 5 months ago
  1. 0

    [JIRA] (JENKINS-37482) AbstractGitSCMSource.retrieve fails due to nonexistent cache directory

    Google Groups | 5 months ago | (JIRA)
    hudson.plugins.git.GitException: Could not init $JENKINS_HOME/caches/git-4ab...
  2. 0

    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( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init( at hudson.plugins.git.GitAPI.init( at jenkins.plugins.git.AbstractGitSCMSource.retrieve( at jenkins.scm.api.SCMSource.fetch( at jenkins.scm.api.SCMSource.retrieve( at jenkins.scm.api.SCMSource.fetch( at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveHeads( at ... Caused by: hudson.plugins.git.GitException: Error performing command: git init $JENKINS_HOME/caches/git-4ab... at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute( ... 34 more Caused by: Cannot run program "git" (in directory "$JENKINS_HOME/caches/git-4ab..."): error=2, No such file or directory at java.lang.ProcessBuilder.start( at hudson.Proc$LocalProc.<init>( at hudson.Proc$LocalProc.<init>( at hudson.Launcher$LocalLauncher.launch( at hudson.Launcher$ProcStarter.start( at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn( ... 38 more Caused by: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>( at java.lang.ProcessImpl.start( at java.lang.ProcessBuilder.start( ... 43 more {code} Perhaps some, but not all, versions of {{git-client}} barf if you try to run {{git init}} in a nonexistent directory?

    Jenkins JIRA | 5 months ago | Jesse Glick
    hudson.plugins.git.GitException: Could not init $JENKINS_HOME/caches/git-4ab...
  3. 0

    jenkins/hudson can't connect to github repo

    Stack Overflow | 5 years ago
    hudson.plugins.git.GitException: Could not clone
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jenkins Mac Slave Error

    Stack Overflow | 4 years ago | DaSilva
    hudson.plugins.git.GitException: Could not clone
  6. 0

    Configuring Jenkins with Bitbucket

    Stack Overflow | 4 years ago | david99world
    hudson.plugins.git.GitException: Could not clone

    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 init $JENKINS_HOME/caches/git-4ab...

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute()
    2. org.jenkinsci.plugins
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init(
      2 frames
    3. Hudson GIT plugin
      1. hudson.plugins.git.GitAPI.init(
      1 frame
    4. jenkins.plugins.git
      1. jenkins.plugins.git.AbstractGitSCMSource.retrieve(
      1 frame
    5. jenkins.scm.api
      1. jenkins.scm.api.SCMSource.fetch(
      2. jenkins.scm.api.SCMSource.retrieve(
      3. jenkins.scm.api.SCMSource.fetch(
      3 frames
    6. jenkins.plugins.git
      1. jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveHeads(
      1 frame