Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65571

Build Error ERROR: Error cloning remote repo 'origin'

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • git-plugin
    • None

      I created a new Jenkins "Free Style" job, entering a Git SCM with https://github.com/<user-name>/<repository>.git/ as "Repository URL" and
      GitHub project-->project url as https://github.com/<user-name>/<repository>.git/

      two issues

      1) in SCM section of "Free Style" job i see error like ailed to connect to repository : Error performing git command:
      git ls-remote -h https://github.com/<user-name>/<repository>.git HEAD

      for above i noticed GitHub Branch SourceUnavailable in manage plugin section

      2) secondly i have not downloaded any git.exe rather am trying to make reference to existing git repository,if i remove SCM with
      https://github.com/<user-name>/<repository>.git/

      as "Repository URL"
      and select none then build succeeds however it does not create directory or copy file on my slave server

      if i don't remove reference i get below error.

      > git init /home/ec2-user/workspace/Test1 # timeout=10
      ERROR: Error cloning remote repo 'origin'
      hudson.plugins.git.GitException: Could not init /home/ec2-user/workspace/Test1
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1025)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:780)
       at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
       at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
       at hudson.remoting.UserRequest.perform(UserRequest.java:211)
       at hudson.remoting.UserRequest.perform(UserRequest.java:54)
       at hudson.remoting.Request$2.run(Request.java:376)
       at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
       at java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
       at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:119)
       at java.lang.Thread.run(Thread.java:834)
       Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip-172-31-41-246.ap-south-1.compute.internal/172.31.41.246:34418
       at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
       at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
       at hudson.remoting.Channel.call(Channel.java:1001)
       at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
       at com.sun.proxy.$Proxy67.execute(Unknown Source)
       at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1223)
       at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1301)
       at hudson.scm.SCM.checkout(SCM.java:505)
       at hudson.model.AbstractProject.checkout(AbstractProject.java:1204)
       at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:636)
       at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
       at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:508)
       at hudson.model.Run.execute(Run.java:1907)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:97)
       at hudson.model.Executor.run(Executor.java:429)
      Caused by: hudson.plugins.git.GitException: Error performing git command: git init /home/ec2-user/workspace/Test1
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2646)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2569)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2565)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1951)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1023)
       ... 12 more
      Caused by: java.io.IOException: Cannot run program "git" (in directory "/home/ec2-user/workspace/Test1"): error=2, No such file or directory
       at java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
       at java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
       at hudson.Proc$LocalProc.<init>(Proc.java:252)
       at hudson.Proc$LocalProc.<init>(Proc.java:221)
       at hudson.Launcher$LocalLauncher.launch(Launcher.java:996)
       at hudson.Launcher$ProcStarter.start(Launcher.java:508)
       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2632)
       ... 16 more

       

            markewaite Mark Waite
            ishaanaws28 ishaan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: