Jenkins-Server certificate verification failed

在Windows7中, Jenkins以Service方式啓動。

 

配置Job 運行 bat command

 

Java代碼  收藏代碼
  1. svn list https://domain_addres/svn  

 

會出現錯誤

 

Java代碼  收藏代碼
  1. svn: E170013: Unable to connect to a repository at URL 'https://10.41.88.3:8443/TSP_rep/P96G/trunk/ZMP_PHONE/modem_proc'
    svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted

 

這是因爲證書無法識別, 需要輸入'p'來保存證書。 但是在Job中是無法手動交互的。

 

Google之後,

http://jenkins.361315.n4.nabble.com/Server-certificate-verification-failed-issuer-is-not-trusted-td391689.html

 

http://blog.csdn.net/kapuliyuehan/article/details/6733903

 

可以指定--config-dir 【可以工作】

 

或者在cmd中手動輸入同樣命令,輸入‘p' 來保持證書。【Jenkins 中仍然不能工作】

 

之後嘗試使用java -jar jenkins.war啓動Jenkins, 錯誤信息沒有出現, 可以工作。於是覺得是不是以Service方式啓動Jenkins的用戶有沒有保存證書。

 

更改LogOn User並重啓Jenkins Service, Job可以正常運行,沒有錯誤信息

This account 選擇當前用戶(因爲在cmd中,當前用戶已經保存了證書)。


親測有用,後來人用之,方法總比困難多。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章