添加Visual Studio Team Service代理 [英] Adding Visual Studio Team Service agent

查看:97
本文介绍了添加Visual Studio Team Service代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Microsoft的Visual Studio Team Services(VSTS),我正在尝试创建一个代理.

For Microsoft's Visual Studio Team Services (VSTS) I am trying to create an Agent.

我已经下载了代理程序并将其放在服务器上.通常,我可以通过运行"ConfigureAgent.cmd"来手动运行此程序,然后输入它要求的信息,这样就可以正常工作.我需要将代理添加到大约50台服务器中,并且正在寻找一种可以绕过手动输入信息的方法.

I have downloaded the agent and put it on the server. Normally I run this manually by running the "ConfigureAgent.cmd" and enter the information it asks for and this works fine. I need to add agents to about 50 servers and am looking for a way I can bypass the manual entering of information.

ConfigureAgent.cmd似乎只是调用VSOAgent.exe

The ConfigureAgent.cmd appears to mostly just call VSOAgent.exe

我检查了需要使用的参数,这似乎是我手动输入的所有字段.

I checked what parameters it takes which seems to be pretty much all the fields I manually entered in.

我尝试此操作并收到错误"ErrorConnectingToTheServer TF400813:资源不可用于匿名访问.需要客户端身份验证."

I try this and receive the error "ErrorConnectingToTheServer TF400813: Resource not available for anonymous access. Client authentication required."

我使用的对VSOAgent.exe的调用是

The call to VSOAgent.exe that I use is

%~dp0Agent\VsoAgent.exe" /configure /RunningAsService /ServerUrl:SERVERURL /Name:"Agent-%ComputerName%" /PoolName:POOLNAME /Login:USERNAME,PASSWORD;AuthType=Basic /force /workfolder:"D:\VSOAgent\_work" /WindowsServiceLogonAccount:USERNAME /WindowsServiceLogonPassword:PASSWORD

推荐答案

我尝试使用您的命令,但未发现任何问题.但是,如果我尝试使用我的帐户登录,则会收到"VS30063:您无权访问 https://xxx "错误消息默认的VSTS帐户.使用备用身份验证凭据"可以正常工作.您可以从我的Profile \ Security \ Alternate身份验证凭据"启用它,然后重试.

I tried with your command but didn't see any issue. However I can get "VS30063: You are not authorized to access https://xxx" error message if I try to login with my default VSTS account. Using "Alternate authentication credentials" works correctly. You can enable it from "My Profile\Security\Alternate authentication credentials" and then try again.

您还可以创建个人访问令牌"并使用"PAT"身份验证类型登录.

You can also create a "Personal access token" and login in with "PAT" authentication type.

常用参数

/Login:UserName,Password [; AuthType =(AAD | Basic | PAT)]

/Login:UserName,Password[;AuthType=(AAD|Basic|PAT)]

用于针对Team Services帐户的配置命令.参数 用于指定池管理员凭据.凭证 用于执行池管理更改,不使用 后来由代理.使用个人访问令牌(PAT)时 身份验证类型,为用户名指定任何内容并指定 PAT作为密码.如果从PowerShell传递参数,请 确保转义分号或将整个参数封装在 引号.例如:"/Login:user,password; AuthType = PAT".否则 该分号将由PowerShell解释为指示结束 一个陈述,另一个陈述的开头.

Used for configuration commands against a Team Services account. The parameter is used to specify the pool administrator credentials. The credentials are used to perform the pool administration changes and are not used later by the agent. When using personal access tokens (PAT) authentication type, specify anything for the user name and specify the PAT as the password. If passing the parameter from PowerShell, be sure to escape the semicolon or encapsulate the entire argument in quotes. For example: '/Login:user,password;AuthType=PAT'. Otherwise the semicolon will be interpreted by PowerShell to indicate the end of one statement and the beginning of another.

有关详细信息,请参考此链接:命令行参数

Refer to this link for details: Command-line parameters

这篇关于添加Visual Studio Team Service代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆