-
Bug
-
Resolution: Not A Defect
-
Major
-
None
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.