上海古都建筑设计集团,上海办公室装修设计公司,上海装修公司高质量的内容分享社区,上海装修公司我们不是内容生产者,我们只是上海办公室装修设计公司内容的搬运工平台

jenkins:> git init# timeout=10 ERROR: Error cloning remote repo ‘origin‘

guduadmin23小时前

这是我在build now时遇到的报错,此时的这个节点是从节点,刚刚搭建完成主从节点去测试能否正常进行build。然后就遇到了这个报错

检查时节点项目配置是没有错误的。所以就是代码没有拉取成功,所以就想是不是从节点的主机上是没有安装git,导致无法拉取代码。

然后从节点安装git就能正常拉取了

jenkins:> git init# timeout=10 ERROR: Error cloning remote repo ‘origin‘,第1张 jenkins:> git init# timeout=10 ERROR: Error cloning remote repo ‘origin‘,第2张

Building remotely on slave1 in workspace /root/jenkins/workspace/test-slave1

The recommended git tool is: NONE

using credential aaffde15-b220-49b1-b92a-1c965b31de65

Cloning the remote Git repository

Cloning repository http://192.168.0.51/web/web.git

> git init /root/jenkins/workspace/test-slave1 # timeout=10

ERROR: Error cloning remote repo 'origin'

hudson.plugins.git.GitException: Could not init /root/jenkins/workspace/test-slave1

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1049)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:802)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)

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:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:126)

at java.lang.Thread.run(Thread.java:748)

Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from NO4/192.168.0.53:42234

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)

at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)

at hudson.remoting.Channel.call(Channel.java:1000)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)

at com.sun.proxy.$Proxy83.execute(Unknown Source)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1225)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)

at hudson.scm.SCM.checkout(SCM.java:540)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)

at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)

at hudson.model.Run.execute(Run.java:1897)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)

at hudson.model.ResourceController.execute(ResourceController.java:101)

at hudson.model.Executor.run(Executor.java:442)

Caused by: hudson.plugins.git.GitException: Error performing git command: git init /root/jenkins/workspace/test-slave1

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2746)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2660)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2656)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1981)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1047)

... 12 more

Caused by: java.io.IOException: Cannot run program "git" (in directory "/root/jenkins/workspace/test-slave1"): error=2, 没有那个文件或目录

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

at hudson.Proc$LocalProc.(Proc.java:254)

at hudson.Proc$LocalProc.(Proc.java:223)

at hudson.Launcher$LocalLauncher.launch(Launcher.java:997)

at hudson.Launcher$ProcStarter.start(Launcher.java:509)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2727)

... 16 more

Caused by: java.io.IOException: error=2, 没有那个文件或目录

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.(UNIXProcess.java:247)

at java.lang.ProcessImpl.start(ProcessImpl.java:134)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

... 21 more

ERROR: Error cloning remote repo 'origin'

Finished: FAILURE

解决办法:

[root@NO4 ~]# yum install -y git #安装git

网友评论

搜索
最新文章
热门文章
热门标签