Friday, March 3, 2017

Jenkins Error : ERROR: Error cloning remote repo 'origin'


If you upgraded and you face following error. 
---------------------------------------------------------------------
Started by user shrikant
Building on master in workspace /var/lib/jenkins/workspace/DEvops
Cloning the remote Git repository
Cloning repository git@xyzserver.com:04761G744/Jpetstore_App.git
 > git init /var/lib/jenkins/workspace/DEvops # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /var/lib/jenkins/workspace/DEvops
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:663)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:464)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1744)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
Caused by: hudson.plugins.git.GitException: Error performing command: git init /var/lib/jenkins/workspace/DEvops
---------------------------------------------------------------------------

** Solution is This **

Enter Jenkins System Configure (Jenkins -> Manage Jenkins -> Configure System )
When you mention absolute path.

 Go Here
and check your git path e.g. /bin/git or /usr/local/bin/git, /usr/bin/git etc.
This error will go away! 

7 comments:

Vamshi Krishna said...


Thanks for sharing the very useful info about DevOps and keep updating........

Neha Kaur said...

"we are offering best devops online training with job support and high quality training facilities and well expert faculty .
to Register you free demo please visit Intellipaat"

Promozie said...

Thanks For Sharing Information.
Apeejay Business Centre in Pune is Providing fully-furnished and equipped workspace in Pune & commercial office space in pune .

DevOps Training in Hyderabad said...

Thank you for such clear explanation, really good great post on Jenkins.

Apeejay Business Center said...

Apeejay Business Centre in Pune is Providing fully-furnished and equipped workspace in Pune & commercial office space in pune .

meena kumari said...

nice blog. thanks for sharing Devops Tutorials. It’s really Helpful for me.

nutana meka said...

Check it once through Devops Online Training for more info.