Wednesday, April 11, 2018

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

In my Jenkins job, I am getting the following error

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/ec2-user/local-jenkins/workspace/vpc_terraform
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:772)
 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:564)
 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
 at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
 at hudson.remoting.UserRequest.perform(UserRequest.java:212)
 at hudson.remoting.UserRequest.perform(UserRequest.java:54)
 at hudson.remoting.Request$2.run(Request.java:369)
 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at java.lang.Thread.run(Thread.java:748)
 
 
I was trying to checkout/download a repository from gitlab. I have given the repo name, credentials and branch.

Solution:

Go to the node where it is going to run (Slave node configuration)
Under Check Tool Locations under Node Properties 
Select Git and input the location of git (which git)
Save and reconnect the slave again.

 

No comments:

Post a Comment