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中,当前用户已经保存了证书)。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值