TeamCity Visual Studio插件,带HTTPS

时间:2017-08-24 16:17:08

标签: visual-studio ssl teamcity

当尝试通过Visual Studio插件(在Visual Studio 2015上运行)登录TeamCity服务器时,我收到以下错误:

  

无法连接到服务器https://10.91.5.44:基础连接已关闭:无法为SSL / TLS安全通道建立信任关系。

我已将自签名证书导入Java证书存储区。

我可以很好地连接到TeamCity管理门户以及Windows托盘工具,我正在寻找一些方向。

感谢。

1 个答案:

答案 0 :(得分:1)

好的,我这样做了:

我让网络人员在内部将TeamCity IP映射为URL, 即:xxx-TeamCity

然后我使用Portecle重新设置了自签名证书,设置:

  

CN:xxx-TeamCity

然后,我使用keytool进行证书导入:

  

keytool -importcert -file xxx-teamcity.cer -alias teamcity -keystore   C:\ TeamCity的\ JRE \ lib \ security中\ cacerts中

然后编辑了server.xml文件:

<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
    SSLEnabled="true"
    scheme="https"
    secure="true"
    connectionTimeout="60000"
    redirectPort="8543"
    clientAuth="false"
    sslProtocol="TLS"
    useBodyEncodingForURI="true"
    keystoreFile="c:\TeamCity\conf\xxx-teamcity.pfx"
    keystorePass="password123"
    socket.txBufSize="64000"
    socket.rxBufSize="64000"
    tcpNoDelay="1"
    /> 

然后我将证书添加到我本地盒子上的可信商店,并且它有效。

所以问题是:CN与DNS条目不匹配,证书不在受信任的商店中(因为它是自签名证书)。

希望能帮助某人。