hudson.plugins.git.GitException: Could not clone

Jenkins JIRA | Hamid EL FAHSSI | 1 year ago
  1. 0

    Hello, I am using http authentication to access the remote git repository. Jenkins and the git bare are actually on the same machine for now. The weird thing is that when I use the http address to access it I get a 'Could not clone git repository' error the first time, and then it works fine. But when I specify a local address to clone, it works perfectly. To handle the authentication, I have created a _netrc file containing the authentication requirements (machine name, login/password). When I try to clone the git repository in a command window it works fine and without problems. What I have seen is that, if the .git repository inside the workspace does not exist the build fails, but if it does it works. Can you please get back to me on how to solve that issue? For info, I am using Hudson version 2.2.0, Git-plugin 2.2.1. The exception trace is: -------------------------------------- Building on master Checkout:workspace / C:\Programs\SmartCDgeneration\HUDSON\jobs\GenerateGitVersion_Test_Clean_13\workspace - hudson.remoting.LocalChannel@b361f2 Using strategy: Default Checkout:workspace / C:\Programs\SmartCDgeneration\HUDSON\jobs\GenerateGitVersion_Test_Clean_13\workspace - hudson.remoting.LocalChannel@b361f2 Wiping out workspace first. Cloning the remote Git repository Cloning repository origin ERROR: Error cloning remote repo 'origin' : Could not clone http://smartco-srvrd1/SmartVersion.git ERROR: Cause: Exception caught during execution of fetch command Trying next repository ERROR: Could not clone repository FATAL: Could not clone hudson.plugins.git.GitException: Could not clone at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:957) at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:668) at hudson.model.AbstractProject.checkout(AbstractProject.java:1479) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424) at hudson.model.Run.run(Run.java:1366) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) --------------------------------- Thanks. Hamid.

    Jenkins JIRA | 1 year ago | Hamid EL FAHSSI
    hudson.plugins.git.GitException: Could not clone
  2. 0

    Hello, I am using http authentication to access the remote git repository. Jenkins and the git bare are actually on the same machine for now. The weird thing is that when I use the http address to access it I get a 'Could not clone git repository' error the first time, and then it works fine. But when I specify a local address to clone, it works perfectly. To handle the authentication, I have created a _netrc file containing the authentication requirements (machine name, login/password). When I try to clone the git repository in a command window it works fine and without problems. What I have seen is that, if the .git repository inside the workspace does not exist the build fails, but if it does it works. Can you please get back to me on how to solve that issue? For info, I am using Hudson version 2.2.0, Git-plugin 2.2.1. The exception trace is: -------------------------------------- Building on master Checkout:workspace / C:\Programs\SmartCDgeneration\HUDSON\jobs\GenerateGitVersion_Test_Clean_13\workspace - hudson.remoting.LocalChannel@b361f2 Using strategy: Default Checkout:workspace / C:\Programs\SmartCDgeneration\HUDSON\jobs\GenerateGitVersion_Test_Clean_13\workspace - hudson.remoting.LocalChannel@b361f2 Wiping out workspace first. Cloning the remote Git repository Cloning repository origin ERROR: Error cloning remote repo 'origin' : Could not clone http://smartco-srvrd1/SmartVersion.git ERROR: Cause: Exception caught during execution of fetch command Trying next repository ERROR: Could not clone repository FATAL: Could not clone hudson.plugins.git.GitException: Could not clone at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:957) at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:668) at hudson.model.AbstractProject.checkout(AbstractProject.java:1479) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424) at hudson.model.Run.run(Run.java:1366) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) --------------------------------- Thanks. Hamid.

    Jenkins JIRA | 1 year ago | Hamid EL FAHSSI
    hudson.plugins.git.GitException: Could not clone
  3. 0

    Hudson and gitosis

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

    Automated exception search integrated into your IDE

  5. 0

    Unable to access private git repositories using Hudson

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

    git clone fails on Hudson on Mac OS X

    Stack Overflow | 5 years ago | everyday productive
    hudson.plugins.git.GitException: Could not clone

    2 unregistered visitors
    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 clone

      at hudson.plugins.git.GitSCM$3.invoke()
    2. Hudson GIT plugin
      GitSCM$3.invoke
      1. hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:957)
      2. hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:889)
      2 frames
    3. Hudson
      FilePath.act
      1. hudson.FilePath.act(FilePath.java:758)
      2. hudson.FilePath.act(FilePath.java:740)
      2 frames
    4. Hudson GIT plugin
      GitSCM.checkout
      1. hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:889)
      2. hudson.plugins.git.GitSCM.checkout(GitSCM.java:668)
      2 frames
    5. Hudson
      Executor.run
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1479)
      2. hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
      3. hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
      4. hudson.model.Run.run(Run.java:1366)
      5. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      6. hudson.model.ResourceController.execute(ResourceController.java:88)
      7. hudson.model.Executor.run(Executor.java:145)
      7 frames