jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'

在slave上是git clone ssh是可以成功的,但是jenkins调用slave节点就报如下错误:

ERROR: Error cloning remote repo ‘origin‘
hudson.plugins.git.GitException: Could not init C:\lebo\workspace\repo1
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:717)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:511)
	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:181)
	at hudson.remoting.UserRequest.perform(UserRequest.java:52)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:98)
	at java.lang.Thread.run(Unknown Source)
	at ......remote call to JNLP4-connect connection from 192.168.8.211/192.168.8.211:49194(Native Method)
	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554)
	at hudson.remoting.UserResponse.retrieve(UserRequest.java:281)
	at hudson.remoting.Channel.call(Channel.java:839)
	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.$Proxy77.execute(Unknown Source)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1083)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1123)
	at hudson.scm.SCM.checkout(SCM.java:495)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:560)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:485)
	at hudson.model.Run.execute(Run.java:1735)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:415)
Caused by: hudson.plugins.git.GitException: Error performing command: git init C:\lebo\workspace\repo1
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1931)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1892)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1888)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1533)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:715)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:511)
	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:181)
	at hudson.remoting.UserRequest.perform(UserRequest.java:52)
	at hudson.remoting.Request$2.run(Request.java:336)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at hudson.remoting.Engine$1$1.run(Engine.java:98)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot run program "git" (in directory "C:\lebo\workspace\repo1"): CreateProcess error=2, 系统找不到指定的文件。
	at java.lang.ProcessBuilder.start(Unknown Source)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:930)
	at hudson.Launcher$ProcStarter.start(Launcher.java:450)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1920)
	... 16 more
Caused by: java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	... 22 more
ERROR: Error cloning remote repo ‘origin‘
Finished: FAILURE

解决:需要在jenkins master上设置Tool Location,如下:

此外:首次下载,需要slave设置ssh-key 到gerrit上,并需要clone一次,选择主机信任。

1.ssh-keygen -t rsa -C [email protected]

2.cat ~/.ssh/id_rsa.pub

3.git config --global user.email "[email protected]"

4.git config --global user.name "anl"

5.git config --global core.editor vim

6.git clone ssh:xxxxxxx


jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'

原文地址:https://www.cnblogs.com/zndxall/p/9052791.html

时间: 2024-07-29 16:27:08

jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'的相关文章

服务器做了格式化后(ip没变),jenkins自动部署报错

jenkins自动部署报错如下:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Some

cacti监控windows主机报错:SNMP Information SNMP error

我用Linux做cacti监控服务器监控windows主机时出现以下错误,自己检查windows主机的SNMP端口正常,防火墙也正常关闭,用snmpwalk命令也报错.自己百度和谷歌终于找到解决问题的,希望有朋友遇到过这种类型的错误快速解决. 1.错误如下: 2.检查windows主机的端口和防火墙 3.在Linux服务器上用snmpswak命令提示错误 4.解决问题(是因为windows主机的SNMP服务没有"接受团体名称") 5.测试正常 cacti监控windows主机报错:SN

故障案例:主从同步报错Fatal error: The slave I/O thread stops because master and slave have equal MySQL server

场景一:因为数据量非常,大概有1.4T,需要在原先master1-slave1的情况下再创建一个库slave2,并且挂在slave1下,即master1-slave1-slave2的结构.为了方便,当时停掉从库salve1,show master status记录状态,开启log_slave_updates,并且关闭salve1,然后将这个从库的data文件夹直接copy到新的从库,结果在创建slave2和slave1的主从关系时报错 Fatal error: The slave I/O thr

【Devops】【docker】【CI/CD】jenkins 清除工作空间报错Error: Wipe Out Workspace blocked by SCM

jenkins 清除工作空间报错 错误如下: Error: Wipe Out Workspace blocked by SCM 解决方法: 进入jenkins服务器,进入workspace,手动rm cd /var/jenkins_home/workspace ===================注释================== 如果你的启动命令如下:[进行了外部目录的挂载] docker run -itd -p 9980:8080 -p 50000:50000 --restart a

Jenkins报错Error fetching remote repo ‘origin‘真正解决办法

Jenkins build时报错Error fetching remote repo 'origin',网上大部分文章都说是git权限问题,其实并不是,造成这个问题的原因是Jenkins有个工作空间( workspace)的概念,Jenkins build时产生的缓存会保存到工作空间里,我们把缓存清理掉就好,参照截图 原文地址:https://blog.51cto.com/kusorz/2358348

连接mysql报错:error 2003 (hy000):can&#39;t connect to mysql server on &#39;localhost&#39; (10061)

一.mysql 的bin目录下有个MySQLInstanceConfig.exe,运行就可以进行创建数据库实例,创建实例时也可以生成windows 服务,把服务设置成自动启动就可以了 二.安装在D盘的discuzz!打开后出现上述错误,请问应如何处理?winmysqladmin已经启动,但三色树上有一个小红点如果出现"ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)",说明你的MySQL还没有启动.解决办法

VC中编译报错:error C2011: &#39;fd_set&#39; : &#39;struct&#39; type redefinition

这是头文件包含顺序的问题,原因与解决办法见下面代码的注释. /* 包含下面这两个头文件时,必须把winsock2.h放在前面 否则编译报错,N多的重定义错误:例如 error C2011: 'fd_set' : 'struct' type redefinition */ #include <WinSock2.h> #include <Windows.h> int main(int argc, _TCHAR* argv[]) { Sleep(1); return 0; } 其实可以不

关于报错“syntax error near unexpected token `”和回车换行

本来是很简单一个事情,转过来是因为打字机这事比较有趣-- http://blog.csdn.net/xyp84/archive/2009/08/11/4435899.aspx 摘要一下: 回车 换行 0D 0A <CR> <LF> Carriage Return Line Feed "/r" "/n" win32 0D 0D 0A unix 0D 0A ============淡定的分割线=============== 今天写了个shell脚

【已解决】unity4.2.0f4 导出Android工程报错:Error building Player: ArgumentException: Illegal characters in path.

你看到的这个文章来自于http://www.cnblogs.com/ayanmw 使用unity3D开发的一个客户端,需要导出为Android工程,然后接入一些第三方android SDK. unity版本 操作系统为: OS 名称: Microsoft Windows 7 旗舰版 OS 版本: 6.1.7601 Service Pack 1 Build 7601 OS 制造商: Microsoft Corporation OS 配置: 独立工作站 OS 构件类型: Multiprocessor