有关为TFS 2017安装构建代理的问题

时间:2016-11-23 20:06:08

标签: tfs tfsbuild azure-pipelines tfs2017

我在SQL Express上安装了一个独立的单服务器TFS 2017 RTM。它不在任何域中,而是在我的笔记本电脑上。为我自己的用法提出了它(也用于学习)。将其设置为在SSL的自签名证书上运行。

考虑在同一台机器上设置vNext构建代理。我记得在我脑子里的某个地方,构建机器应该不在TFS应用层,以减少表面攻击。好吧,我现在对表面攻击并不感兴趣。但我需要一个带有构建设置的工作TFS。

在输入URL(https URL)后进行配置时,系统会提示我输入身份验证类型。我输入了谈判。输入凭据后,我得到以下错误。

TF400813: Resource not available for anonymous access. Client authentication required.

使用Integrated作为身份验证类型时,我收到以下错误。

An error occurred while sending the request.
Failed to connect.  Try again or ctrl-c to quit

当我使用http网站获取URL时,我的两种身份验证类型都会出现以下错误。

Connecting to server ...
Found
Failed to connect.  Try again or ctrl-c to quit

我可以ping到我的网址。

以下是_diag文件夹中的错误日志。

[2016-11-23 19:53:40Z INFO CredentialManager] Creating type Integrated
[2016-11-23 19:53:40Z INFO CredentialManager] Creating credential type: Integrated
[2016-11-23 19:53:40Z INFO IntegratedCredential] GetVssCredentials
[2016-11-23 19:53:40Z INFO ConfigurationManager] cred retrieved
[2016-11-23 19:53:40Z INFO Terminal] WRITE LINE: Connecting to server ...
[2016-11-23 19:53:41Z INFO CommandSettings] Flag 'unattended': 'False'
[2016-11-23 19:53:41Z ERR  Terminal] WRITE ERROR (exception):
[2016-11-23 19:53:41Z ERR  Terminal] Microsoft.VisualStudio.Services.WebApi.VssServiceResponseException: Found
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.HandleResponse(HttpResponseMessage response)
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__42`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.Location.VssServerDataProvider.<ConnectAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.AgentServer.<ConnectAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<TestConnectAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()

3 个答案:

答案 0 :(得分:0)

尝试禁用匿名身份验证并为您的TFS启用Windows身份验证。

由于您为自己的用途设置了TFS,因此可以考虑使用Visual Studio Team Service而不是内部部署TFS。 VSTS对5位用户免费。

答案 1 :(得分:0)

尝试使用PAT作为身份验证类型,并从配置文件菜单中的“安全性”页面获取个人访问令牌。使用选定范围 - 代理池(读取,管理)

请参阅http://go.microsoft.com/fwlink/?LinkID=825113

个人访问令牌用于注册代理。最后一步是提供代理服务的凭据。

答案 2 :(得分:0)

有些事情可能出错了。

在按照Remko的回答并继续使用“ PAT”切换到“协商”方法之后,如果由于“发送请求时发生错误”而仍然不能使它工作,则可能是由于证书问题。在这种情况下,只需传递如下参数-sslskipcertvalidaion,就可以跳过在curl内部发生的证书验证步骤。

./config.sh --sslskipcertvalidation

此处是参考文档:running agent with self-signed certificate