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

时间:2021-02-08 12:50:48   收藏:0   阅读:0

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

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

技术图片

 

 

怎么办呢?

试了很多方法:

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

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

 

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

试了一下本地Clone:

   技术图片

 

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

    技术图片

 

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

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!