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

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

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

    Google Groups | 4 months ago | jgl...@cloudbees.com (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(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?

    Jenkins JIRA | 4 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 git@github.com:adulion/.git
  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 git@bitbucket.org:nameProjectGit
  6. 0

    Configuring Jenkins with Bitbucket

    Stack Overflow | 4 years ago | david99world
    hudson.plugins.git.GitException: Could not clone git@bitbucket.org:DAVID99WORLD/assessme.git

    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
      CliGitAPIImpl.init
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.init(CliGitAPIImpl.java:181)
      2 frames
    3. Hudson GIT plugin
      GitAPI.init
      1. hudson.plugins.git.GitAPI.init(GitAPI.java:217)
      1 frame
    4. jenkins.plugins.git
      AbstractGitSCMSource.retrieve
      1. jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:275)
      1 frame
    5. jenkins.scm.api
      SCMSource.fetch
      1. jenkins.scm.api.SCMSource.fetch(SCMSource.java:147)
      2. jenkins.scm.api.SCMSource.retrieve(SCMSource.java:231)
      3. jenkins.scm.api.SCMSource.fetch(SCMSource.java:176)
      3 frames
    6. jenkins.plugins.git
      AbstractGitSCMSourceTest.retrieveHeads
      1. jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveHeads(AbstractGitSCMSourceTest.java:74)
      1 frame