1. 问题描述
在gitlab中集成jira的时候,由于jira是企业内部网址,并使用自己签名的SSL证书,一直会报证书验证不过的问题,报错信息如下:
Connection failed. Check your integration settings. SSL_connect returned=1 errno=0 peeraddr=xxx.xxx.xxx.xxx:443 state=error: certificate verify failed (self signed certificate in certificate chain)
通过报错信息在网上搜了一通也没找到合适的解决方案,通过一些描述信息感觉是Ruby on rails调用https的时候,没有找到合适的证书,然后才报证书验证错误。
2. 解决方案
2.1. 生成对应的pem证书
执行命令如下:
openssl s_client -showcerts -connect jira.xxx.com:443 < /dev/null