Jenkins-Server certificate verification failed

在Windows7中, Jenkins以Service方式启动。

 

配置Job 运行 bat command

 

svn list https://domain_addres/svn

 

会出现错误

 

Error validating server certificate for 'https://domain_addres:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
 - The certificate hostname does not match.
Certificate information:
 - Hostname: chopin
 - Valid: from Thu, 19 May 2011 23:33:33 GMT until Sun, 16 May 2021 23:33:33 GMT
 - Issuer: chopin
 - Fingerprint: 56:00:85:5d:07:e7:96:5c:b7:95:05:17:d7:9c:c7:cf:b3:bd:9c:66
(R)eject, accept (t)emporarily or accept (p)ermanently? svn: OPTIONS of 'https://domain_addres/svn': Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (https://domain_addres)

 

这是因为证书无法识别, 需要输入'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中,当前用户已经保存了证书)。

Jenkins-Server certificate verification failed_第1张图片

 

 

你可能感兴趣的:(Java)