问题描述
我们有一个本地TFS2015RC安装。服务器是我们域的一部分。
We have an on-premise TFS2015RC installation. The server is part of our domain.
在同一域中的另一台服务器上配置构建代理(build.vnext)时,一切正常。
When configuring a build agent (build.vnext) on another server in the same domain, everything works as expected.
但是,在此域之外的服务器上配置构建代理时,会发生以下情况:
However, when configuring a build agent on a server outside of this domain, the following happens:
使用ConfigureAgent.ps1:
Using ConfigureAgent.ps1:
- 接受所有默认值
- 选择交互模式(未作为Windows服务安装)
- 然后显示一个身份验证对话框:
- 我输入一个域用户(
domain\user
)是TFS的管理员 - 我为此用户提供了域密码。如果密码错误,则对话框会提示您,我需要更正它(Windows中的默认行为)
- 我输入一个域用户(
- accept all defaults
- choose interactive mode (e.i. not installed as Windows Service)
- then an authentication dialog shows up:
- I enter a domain user (
domain\user
) which is administrator of TFS - I provide the domain password for this user. If the password is wrong, the dialog will say so and I need to correct it (default behavior in Windows)
- I enter a domain user (
为什么身份验证失败?如何找出要与哪个用户进行身份验证?
Why is the authentication failing? How can I find out with which user it is trying to authenticate?
我尝试过:
- 查看_diag文件夹中的日志文件。日志文件中的状态完全相同,但没有更多可用信息。
- 尝试了来自以在TFS服务器上的IIS上启用基本身份验证。我这样做(很不情愿),但无法解决问题。
- looking at the logfile in the _diag folder. The log file states exactly the same, without more usable info.
- tried the advice from this link to enable Basic Authentication on IIS on the TFS server. I did this (reluctantly) but it does not resolve the issue.
推荐答案
我可以管理解决以下问题:
OK I managed to resolve the issue like this:
- 在TFS服务器上创建用户TFS\remotebuild
- 将此本地
用户访问权授予TFS代理池 - 将该本地用户访问权授予TFS源代码管理
- 创建了一个用户BUILD the使用与TFS相同的密码在Build服务器上进行远程构建liremotebuild
- 在运行构建代理配置脚本时,当它询问服务帐户时,选择BUILD\remotebuild用户
- 当要求进行TFS身份验证时,请提供TFS\remotebuild用户凭证
- create a user TFS\remotebuild on the TFS server
- gave this localuser access to the TFS Agent Pools
- gave this local user access to TFS Source Control
- created a user BUILD\remotebuild on the Build server with same password as TFS\remotebuild
- when running the build agent configuration script, when it ask for the service accounts, choose the BUILD\remotebuild user
- when it ask for TFS authentication, provide the TFS\remotebuild user credentials
, 这是工作!
但是,我无法以某种方式使其在控制台模式下运行(即,未将其作为Windows服务启动)。这不是大问题。
Like this, it is working!However, I somehow cannot get it to run in "console mode" (i.e. not starting it as a windows service). This is not a big issue.
此后有一个小问题:在日志文件中,我可以看到它正在尝试连接到而不是,但我可以通过在构建计算机上的主机文件中添加一行来解决该问题。
There was one small issue after this: in the logfile I could see it was trying to connect to http://NAME-OF-TFS:8080/tfs instead of http://IP-ADDRESS:8080/tfs, but I could resolve that issue by adding a line to the hosts file on the build machine.
这篇关于如何验证build.vnext代理到本地TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!