当前位置:   article > 正文

jenkins Error performing command: git ls-remote -h_failed to connect to repository : error performing

failed to connect to repository : error performing git command: ls-remote -h

Jenkins新建项目中源码管理使用Git时遇到如下问题:

Failed to connect to repository : Error performing command: git ls-remote -h http://192.168.0.22/finance/AMS-Server.git HEAD


解决:

1.Jenkins服务器上查看git是否已安装及安装位置

  git version

  whereis git

 

 (yum  install git 安装的Git版本过低,应该用jenkins安装插件或自行安装更高版本


2. 打开Jenkins的 主页面 > 系统管理 > Global Tool Configuration

   可以看到错误提示:There's no such executable git in PATH: /sbin, /usr/sbin, /bin, /usr/bin.

 

  在出错的地方填入: "whereis git"的地址 + "/bin/git" (如上面"whereis git"的地址为"/usr/local/git",则应该填入 "/usr/local/git/bin/git") 并保存


3.   多刷新几次,在源码管理中添加Git 地址,可以发现已经好了
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/867726
推荐阅读
相关标签
  

闽ICP备14008679号