0

Not able to clone git repo in jenkin. Getting below error( same job was working fine and there are no changes to the git repo)

Cloning repository origin
Error trying to determine the git version: Error performing command:  --version
null
Assuming 1.6
ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]
hudson.plugins.git.GitException: Could not clone [email protected]
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:245)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1073)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1014)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1014)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
    at hudson.model.Run.execute(Run.java:1567)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.plugins.git.GitException: Error performing command:  clone -o origin [email protected] /var/lib/jenkins/jobs/xxx/yyy
null
    at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:776)
    at hudson.plugins.git.GitAPI.access$000(GitAPI.java:38)
    at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:241)
    at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:221)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:221)
    ... 13 more
winadi
  • 141
  • 1
  • 6

2 Answers2

0

You have to install jenkins git plugin

Cœur
  • 37,241
  • 25
  • 195
  • 267
Arsen
  • 509
  • 2
  • 8
  • 20
0

Check belows

  1. Check you have installed Git plugin.
  2. Check you have configured Jenkin to use local git (Since your command doesn't start with Git command, incase not, set Git path in Jenkin).
  3. Check weather Git is configured to bypass SSL Configuration, Refer "Jenkins Git integration - How to disable SSL certificate validation"
ravi creed
  • 371
  • 3
  • 6