简体   繁体   English

前提构建代理上的TFS-无法建立SSL / TLS安全通道的信任关系

[英]TFS On Premise Build Agent - Could not establish trust relationship for the SSL/TLS secure channel

I have setup one TFS On-Premise Build Agent as a service using the instructions listed here . 我已使用此处列出的说明将一个TFS本地构建代理设置为服务。 I setup the accompanying Agent pool, permissions, build controller, etc.. and worked through most of the setup challenges around getting the agent to connect and run. 我设置了随附的代理程序池,权限,构建控制器等。并解决了有关使代理程序连接和运行的大多数设置难题。 I now have a agent that is connected and able to run builds: 我现在有一个已连接并能够运行构建的代理:

在此处输入图片说明 在此处输入图片说明

My configuration looks something like this: 我的配置如下所示:

"settings.json" - "ServerURL": http://tfs.XXXXXXXXX.com:80/tfs “ settings.json”-“ ServerURL”: http ://tfs.XXXXXXXXX.com:80/ tfs

"Listen for Build Agent communication on:" http://XXXXXXXXXXX.com:9191/Build/v5.0/Services “收听有关以下内容的Build Agent通信:” http://XXXXXXXXXXX.com:9191/Build/v5.0/Services

But when I try to run any build using my newly configured Agent Pool it always fails when an entry in the Agent's log: 但是,当我尝试使用新配置的代理程序池运行任何内部版本时,在代理程序日志中的条目出现时,它总是会失败:

System.Net.Http.HttpRequestException: An error occurred while sending the request. System.Net.Http.HttpRequestException:发送请求时发生错误。 ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Net.WebException:基础连接已关闭:无法建立SSL / TLS安全通道的信任关系。 ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure. ---> System.Security.Authentication.AuthenticationException:根据验证过程,远程证书无效。

The Agent failed to start this job. 代理无法启动此作业。 Error: An error occurred while sending the request. 错误:发送请求时发生错误。

This is very confusing to me because nowhere in my TFS configuration am I using SSL. 这对我来说非常令人困惑,因为我在TFS配置中没有使用SSL。 How would it fail on a bad certificate(in this case self-signed) if I'm not using port 443 to connect to it. 如果我没有使用端口443连接到证书,它将如何在错误的证书(在这种情况下为自签名)上失败。 When I connect through a web browser(firefox) to that location I'm not automatically redirected to "https". 当我通过网络浏览器(firefox)连接到该位置时,不会自动重定向到“ https”。 Is the agent somehow being redirected? 代理是否以某种方式被重定向? Again, I'm able to connect without issue(or failing certificate) to the listed URLs, but It seems for some reasons the agent is not. 同样,我可以无问题(或证书失败)连接到列出的URL,但是由于某些原因,代理没有。

I'm not sure if I'm the only one who's got this issue. 我不确定我是否是唯一遇到此问题的人。 I think this is related, but not the same version of software. 我认为是相关的,但不是同一版本的软件。 There's a million other references to this error message, but I don't see a single one with the same context or configuration. 关于此错误消息还有其他一百万种引用,但我看不到具有相同上下文或配置的单个引用。 Has anyone ever seen this issue before? 以前有没有人看过这个问题?

The Team Foundation Server itself has a setting called the Notification Uri, whenever anything asks where it can find stuff it will use this Uri to send back the location. Team Foundation Server本身具有一个称为“通知Uri”的设置,每当有人询问在哪里可以找到东西时,它将使用此Uri发送回该位置。

In you case the build server wants to know all kinds of things, download source code, the build process template, upload test results etc. When asking where to grab these from or send these to, TFS will respond with that Notification Uri. 在这种情况下,构建服务器希望了解所有内容,下载源代码,构建过程模板,上传测试结果等。当询问从何处获取或发送这些结果时,TFS将以该Notification Uri进行响应。

Your server is configured to use a self-signed SSL certificate, the server is configured to send back the secure location through it's notification Uri property, thus your client needs to build a trust relation to establish the communication. 您的服务器配置为使用自签名SSL证书,服务器配置为通过其通知Uri属性发送回安全位置,因此您的客户端需要建立信任关系才能建立通信。

There are three solutions: 有三种解决方案:

  1. install a trusted certificate on the TFS server (in case you're in an active dircetory setup, this may not be as hard as it seems). 在TFS服务器上安装受信任的证书(如果您处于活动目录设置中,则可能看起来并不那么困难)。
  2. install the self-signed certificate in the trusted root certificate store of each windows computer connecting to the TFS server 将自签名证书安装在连接到TFS服务器的每台Windows计算机的受信任的根证书存储中
  3. Turn of SSL on your TFS server by removing the cert from the IIS binding and reconfiguring the server and notification URI. 通过从IIS绑定中删除证书并重新配置服务器和通知URI,在TFS服务器上启用SSL。

Note: disabling SSL may introduce holes in your security setup depending on how authentication is configured. 注意:禁用SSL可能会在安全设置中造成漏洞,具体取决于身份验证的配置方式。 If you server accepts basic auth, or when you upgrade to TFS2017 and activate support for Personal Access Tokens, your authentication token may be sent over the wire in clear text. 如果您的服务器接受基本身份验证,或者当您升级到TFS2017并激活对个人访问令牌的支持时,您的身份验证令牌可能会以明文形式通过网络发送。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 随机抛出“无法建立SSL / TLS安全通道的信任关系” - Randomly throwing “Could not establish trust relationship for the SSL/TLS secure channel” 具有有效证书的“无法为SSL / TLS安全通道建立信任关系” - “Could not establish trust relationship for the SSL/TLS secure channel” with valid certificate 无法为 SSL/TLS 安全通道建立信任关系 -- SOAP - Could not establish trust relationship for SSL/TLS secure channel -- SOAP 如何解决“无法为具有权限的 SSL/TLS 安全通道建立信任关系” - How to solve "Could not establish trust relationship for the SSL/TLS secure channel with authority" C#如何解决HtppWebResponse返回无法为[SSL / TLS]安全通道建立信任关系? - C# How to solve HtppWebResponse return Could not establish trust relationship for the [SSL/TLS] secure channel? 无法与主题备用名称证书建立SSL / TLS安全通道的信任关系 - Could not establish trust relationship for the SSL/TLS secure channel with subject alternative name certificate .NET 4.6.2 中 SOAP 的“无法为具有授权的 SSL/TLS 安全通道建立信任关系” - “Could not establish trust relationship for the SSL/TLS secure channel with authority” for SOAP in .NET 4.6.2 “无法为 SSL/TLS 安全通道建立信任关系。” signalr2.2、https、.net 客户端、自定义证书的异常 - “Could not establish trust relationship for the SSL/TLS secure channel.” Exception on signalr2.2, https, .net client, custom certificate 无法为具有权限“*”的 SSL/TLS 建立安全通道 - Could not establish secure channel for SSL/TLS with authority '*' WCF错误“无法为SSL / TLS建立安全通道……” - WCF Error “Could not establish secure channel for SSL/TLS …” out of the blue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM