gpt4 book ai didi

visual-studio - 带 HTTPS 的 TeamCity Visual Studio 插件

转载 作者:太空宇宙 更新时间:2023-11-03 13:22:28 26 4
gpt4 key购买 nike

尝试通过 Visual Studio 插件(在 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 条目不匹配,并且证书不在受信任的存储区中(因为它是自签名证书)。

希望对某人有所帮助。

关于visual-studio - 带 HTTPS 的 TeamCity Visual Studio 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45866560/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com