【解决方案】【jenkins】填写 git 仓库地址报错:Failed to connect to repository : Error performing git command: git.exe ls-remote -h https://gitee.com/kid-gogogo/my_new_git.git HEAD

本贴最后更新于 704 天前,其中的信息可能已经时移世改

jenkins新建任务时,填写git仓库地址后红字报错:

Failed to connect to repository : Error performing git command: git.exe ls-remote -h https://gitee.com/kid-gogogo/my_new_git.git HEAD

原因:jenkins未匹配到本地git环境

解决:

  1. command命令行输入 where git 获取git路径(若没有查到需要先安装git)
  2. 登陆jenkins --> Manage Jenkins --> Global Tool Configuration,在Path to Git executable中填写git路径

image.pngimage.png

回帖
请输入回帖内容 ...