在jenkins新建工程,配置源码管理时,发现输入gitlab的Repository URL,总会抛出一个错误:

解决:Failed to connect to repository : Error performing command: git.exe ls-remote -h xxxxxxx HEAD

后来在网上各种百度,终于找到了一篇比较靠谱的文章,顺着文章的提示,去Manage Jenkins—Global Tool Configuration里面查看

解决:Failed to connect to repository : Error performing command: git.exe ls-remote -h xxxxxxx HEAD

发现找不到git.exe,因为我的jenkins是装在本地的,git是cmder自带的,因此可能jenkins的环境变量下没有找到

解决:Failed to connect to repository : Error performing command: git.exe ls-remote -h xxxxxxx HEAD

这时候只需要拷贝一份本地的git.exe的绝对路径到 Path to Git executable 下,就可以了

解决:Failed to connect to repository : Error performing command: git.exe ls-remote -h xxxxxxx HEAD

 

相关文章:

  • 2021-11-01
  • 2021-10-14
  • 2022-01-14
  • 2021-06-21
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2021-07-26
  • 2021-06-05
  • 2021-09-10
  • 2021-07-29
  • 2021-12-21
相关资源
相似解决方案