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