Jenkins 部署项目出现 Failed to connect to repository : Command "git ls-remote XXX


Jenkins 部署项目出现 Failed to connect to repository : Command "git ls-remote XXX

表示为,Jenkins无法连接到你输入的Repository URL的 Git仓库……

 

 

怎么办呢?

试了很多方法:

1、在git仓库里面配置公钥、在Jenkins任务里配置git私钥——此法无效

(reference: https://blog.csdn.net/huqiankunlol/article/details/93485719

 

2、倏而想到,要想是要在Repository URL  加上账号和密码才行。

试了一下本地Clone:

   

 ——果不其然,确实是需要在git URL 上,加入账号和密码的。

    

 

 ——完美解决,不会报错了。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM