[英]TeamCity build agent becomes disconnected after adding self-signed https certificate to teamcity
我向我的Teamcity BuildServer添加了一个自签名证书,以引入https支持,以便现在可以访问它
https://ServerUrl:8443
(更多细节如何在这里 )
结果是我能够通过https访问服务器,但我的构建代理现在已断开连接。 如何解决这个问题?
构建代理充当构建服务器的客户端并使用http / https与其进行通信,结果发现当您添加自签名证书时,构建代理不接受它。
我需要
要更改路径,我执行了以下操作(有关详细信息,请参阅此帖子 )
找到文件:
$ TEAMCITY_HOME / buildAgent / conf目录/ buildAgent.properties
改变财产
serverUrl = http:\\:// localhost \\:8080到你的新网址
为了让构建代理知道它可以信任新证书,我必须将其导入构建代理的密钥存储区。这是使用keytool完成的:
keytool -importcert -file <cert file>
-keystore <agent installation path>/jre/lib/security/cacerts
( 除非你更改了它,密钥库受密码保护:changeit )
在TeamCity的团队描述了稍微细节这个过程在这里
注意
如果需要从TeamCity构建服务器密钥库中检索证书,还可以使用keytool执行此操作 :
keytool -export -alias <alias name>
-file <certificate file name>
-keystore <Teamcity keystore path>
以下是keytool上TeamCity v8文档的链接 。
我在Windows Build Agent上执行此操作,并在我的Amazon Linux Build Server上拥有自签名SSL证书。 以下是我采取的步骤:
完全按照文档中的规定使用keytool
> keytool -importcert -file <cert file where it was exported to> -keystore <path to JRE installation>/lib/security/cacerts password: changeit
重新启动构建代理和中提琴!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.