在Windows7中, Jenkins以Service方式启动。
配置Job 运行 bat command
- svn list https://domain_addres/svn
会出现错误
-
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中,当前用户已经保存了证书)。
亲测有用,后来人用之,方法总比困难多。