hudson.plugins.git.GitException: Could not clone

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.

  • Hudson runs in Tomcat as Hudson. Identical jobs work perfectly well at this time. Some jobs like this show the error, then recover with no action taken. Initial error: {code} Started by user Lee Building on master Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 Using strategy: Default Last Built Revision: Revision 19273e2fc694db71b33500ab70967cbd92b4b2b2 (origin/master) Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 GitAPI created Cloning the remote Git repository Cloning repository origin $ /usr/bin/git clone -o origin git@gitosis.net-a-porter.com:xt /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace ERROR: Error cloning remote repo 'origin' : Could not clone git@gitosis.net-a-porter.com:xt ERROR: Cause: Error performing /usr/bin/git clone -o origin git@gitosis.net-a-porter.com:xt /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace null Trying next repository ERROR: Could not clone repository FATAL: Could not clone hudson.plugins.git.GitException: Could not clone at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:719) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1038) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) {code} Later attempts to build show: {code} Started by user Lee Building on master Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 Using strategy: Default Last Built Revision: Revision 19273e2fc694db71b33500ab70967cbd92b4b2b2 (origin/master) Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 GitAPI created Fetching changes from the remote Git repository Fetching upstream changes from git@gitosis.net-a-porter.com:xt [workspace] $ /usr/bin/git fetch -t git@gitosis.net-a-porter.com:xt +refs/heads/*:refs/remotes/origin/* error: cannot open .git/FETCH_HEAD: Permission denied ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway ERROR: Could not fetch from any repository FATAL: Could not fetch from any repository hudson.plugins.git.GitException: Could not fetch from any repository at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:691) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1038) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java {code} Solved the problem by: * {{su hudson}} and ran the git command, got the 'cannot change to /root' error * {{sudo rm -Rf $the_workspace}} * {[su hudson}} ran the git command and got no problem. The workspace was craeted by Hudson by cloning another job.
    via by leegee,
  • Hudson runs in Tomcat as Hudson. Identical jobs work perfectly well at this time. Some jobs like this show the error, then recover with no action taken. Initial error: {code} Started by user Lee Building on master Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 Using strategy: Default Last Built Revision: Revision 19273e2fc694db71b33500ab70967cbd92b4b2b2 (origin/master) Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 GitAPI created Cloning the remote Git repository Cloning repository origin $ /usr/bin/git clone -o origin git@gitosis.net-a-porter.com:xt /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace ERROR: Error cloning remote repo 'origin' : Could not clone git@gitosis.net-a-porter.com:xt ERROR: Cause: Error performing /usr/bin/git clone -o origin git@gitosis.net-a-porter.com:xt /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace null Trying next repository ERROR: Could not clone repository FATAL: Could not clone hudson.plugins.git.GitException: Could not clone at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:719) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1038) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129) {code} Later attempts to build show: {code} Started by user Lee Building on master Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 Using strategy: Default Last Built Revision: Revision 19273e2fc694db71b33500ab70967cbd92b4b2b2 (origin/master) Checkout:workspace / /disk/hudson/jobs/DC_Chain_30_Aspects_goodsin_3030/workspace - hudson.remoting.LocalChannel@59601d60 GitAPI created Fetching changes from the remote Git repository Fetching upstream changes from git@gitosis.net-a-porter.com:xt [workspace] $ /usr/bin/git fetch -t git@gitosis.net-a-porter.com:xt +refs/heads/*:refs/remotes/origin/* error: cannot open .git/FETCH_HEAD: Permission denied ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway ERROR: Could not fetch from any repository FATAL: Could not fetch from any repository hudson.plugins.git.GitException: Could not fetch from any repository at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:691) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1038) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java {code} Solved the problem by: * {{su hudson}} and ran the git command, got the 'cannot change to /root' error * {{sudo rm -Rf $the_workspace}} * {[su hudson}} ran the git command and got no problem. The workspace was craeted by Hudson by cloning another job.
    via by leegee,
  • Hudson+Git clone failure
    via Stack Overflow by Nerdia
    ,
  • Hudson git clone error
    via Stack Overflow by Željko Filipin
    ,
  • Jenkins could not run git
    via Stack Overflow by Andreas Köberle
    ,
  • Hudson git plugin won't clone repo on Linux
    via Stack Overflow by Matt W
    ,
    • hudson.plugins.git.GitException: Could not clone at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:719) at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:658) at hudson.FilePath.act(FilePath.java:753) at hudson.FilePath.act(FilePath.java:735) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:658) at hudson.model.AbstractProject.checkout(AbstractProject.java:1038) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1248) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:129)
    No Bugmate found.