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

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init C:\lebo\workspace\repo1at 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\repo1at 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 anl@hpplay.cn

2.cat ~/.ssh/id_rsa.pub

3.git config --global user.email "anl@hpplay.cn"

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

5.git config --global core.editor vim

6.git clone ssh:xxxxxxx

转载于:https://www.cnblogs.com/zndxall/p/9052791.html

jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'相关推荐

  1. Jenkins构建时报错 GitERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException

    --昨夜西风凋碧树,独上高楼,望尽天涯路 Jenkins + GitLab持续集成时遇到如下错误: ERROR: Error cloning remote repo 'origin' hudson.p ...

  2. jenkins构建项目报错:java:[17,37] package xx.xx.xxx does not exist

    场景描述 今天遇到了一个很奇怪的问题,在IDEA运行正常的项目,发布到jenkins就会报错: [ERROR] COMPILATION ERROR : [INFO] ----------------- ...

  3. 项目部署至Jenkins之后出现报错:git无法下载github中的工程

    错误提示如下: Started by user admin Running as SYSTEM Building remotely on TestEnv in workspace /root/.jen ...

  4. redis设置主从复制-slave Replication--解决报错:(error) READONLY You can't write against a read only slave.

    我的个人博客:zhang0peter的个人博客 主节点按照我上篇文章的内容配好redis后就可以了:ubuntu, debian 安装redis,设置开机自动启动和密码,允许外网访问 在从节点安装好r ...

  5. Windows下运行rabbitmqctl 相关命令(如rabbitmqctl stop)报错:Error: unable to perform an operation on node解决方案

    Windows下运行rabbitmqctl 相关命令(如rabbitmqctl stop)报错:Error: unable to perform an operation on node解决方案 参考 ...

  6. Windows安装pyav报错:ERROR: Failed building wheel for av.Failed to build av. ERROR: Could not build wheel

    Windows安装pyav报错:ERROR: Failed building wheel for av.Failed to build av. ERROR: Could not build wheel ...

  7. Jenkins报错Error fetching remote repo 'origin'真正解决办法

    Jenkins build时报错Error fetching remote repo 'origin',网上大部分文章都说是git权限问题,其实并不是,造成这个问题的原因是Jenkins有个工作空间( ...

  8. Sublime Text 3便携版下载安装和常用插件安装--顺便解决报错An error occured installing和no packages available for install

    文章目录 Sublime Text 3便携版下载安装和常用插件安装 1.Sublime Text 3便携版下载: 2.sublime 插件控制器(Package Control)安装 2.1离线安装P ...

  9. windows10下编译dllib报错: ERROR: Failed building wheel for dlib

    一.报错信息 在安装dlib的时候,使用pip进行安装 pip install dlib 二.解决方式 1.检查自己是否已经安装了cmake 首先要检测自己本机是否已经安装了cmake,因为安装dli ...

最新文章

  1. 【译】为什么要写super(props)
  2. vue仿今日头条_vue2.0仿今日头条开源项目
  3. DC/DC电源模块介绍
  4. manjaro 宝塔面板_宝塔Linux面板FTP无法连接的解决办法
  5. flutter 自定义 AppBar
  6. 运行一个Hadoop Job所需要指定的属性
  7. 使用JavaScript调用Microsoft XMLDOM库进行XML字符串的解析
  8. html 保存文件指定路径,78.上传文件及在服务器保存文件到任意路径
  9. 万兆网卡实际吞吐量_AKITIO 10G/NBASE-T PCIe 网卡开箱拆解评测
  10. flashbackup闪回数据库
  11. 分布式开发必须了解的Zookeeper的Leader选举机制(源码解析)
  12. python jsonpath效率低_Python学习:jsonpath的性能问题
  13. django-单表的增删改查-用户部门表
  14. 无线通信基础(三):高斯噪声中的估计
  15. 关于opencv中 tf_text_graph_ssd.py生成pbtxt报错的解决方案
  16. 国产13.56MHz读写器芯片Ci521替代兼容CV520
  17. 台式计算机时间不能同步,电脑时间同步不了怎么办
  18. python绘制太阳花_Python绘制蟒蛇和太阳花
  19. b5纸尺寸_标准a2纸尺寸是多少厘米,设计宣传手册尺寸有哪些
  20. wireshark抓包并复原图像

热门文章

  1. Java的基本程序设计
  2. IE安全系列:IE的自我介绍 (I)
  3. 常见卫星图源下载教程
  4. 【蓝桥杯选拔赛真题24】python回文数 青少年组蓝桥杯python 选拔赛STEMA比赛真题解析
  5. 防抵赖 java_一种防抵赖的架构方法与流程
  6. java中Sources目录Resources目录的区别
  7. python-threading多线程龟兔赛跑
  8. mapinfo常用功能系列讲解——(3)统计线段长度(SQL统计法)
  9. 2020年第十届C/C++ A组第一场蓝桥杯省赛真题
  10. php获取视频的真实地址,PHP获取youku视频真实flv文件地址的方法,