TeamCity Visual Studio 插件 w/HTTPS

TeamCity Visual Studio Plugin w/HTTPS

尝试通过 Visual Studio 插件(运行 on Visual Studio 2015)登录 TeamCity 服务器时,出现以下错误:

Failed to connect to the server https://10.91.5.44: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

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

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

谢谢。

好的,我是这样工作的:

我让网络人员在内部将 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 条目不匹配,并且证书不在受信任的存储区中(因为它是自签名证书)。

希望对某人有所帮助。