tf.exe对vsts进行身份验证 [英] tf.exe authenticate for vsts

查看:87
本文介绍了tf.exe对vsts进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图列出所有工作区,并尝试使用以下命令行通过vsts对tf.exe进行身份验证.

I am trying to list all the workspaces and trying to authenticate tf.exe with vsts using the below commandline.

tf工作区/Collection: https://[account] .visualstudio.com/defaultcollection /login:用户名,密码

tf workspaces /Collection: https://[account].visualstudio.com/defaultcollection /login:USername,Password

vsts帐户由Azure Active Directory支持,并与本地AD同步.

The vsts account is backed by Azure Active Directory synced with an on-prem AD.

当我从Visual Studio连接到vsts,然后在没有登录开关的情况下运行上面的tf.exe命令时,效果很好.

It works fine when I have connected to the vsts from visual studio and then running the above tf.exe command without the login switch.

但是,当我将登录开关用于tf.exe并使用我在Visual Studio中使用的相同凭据时,会抛出

But, when I use the login switch for tf.exe and use the same credentials that I use in visual studio it throws

TF30063:您无权访问 https://[account] .visualstudio.com/defaultcollection TF30063:您无权访问 https://[account] .visualstudio.com/defaultcollection

TF30063: You are not authorized to access https://[account].visualstudio.com/defaultcollection TF30063: You are not authorized to access https://[account].visualstudio.com/defaultcollection

我要实现的目标是,先配置服务器,然后再不登录到Visual Studio,并希望我的tf在登录到Team Explorer的Visual Studio在线帐户时能够正常工作.我的视觉工作室.

What I am trying to achieve is that I am going to provision a server and then not going to login to visual studio and want my tf to work as it works when logged in to the visual studio online account in the team explorer of my visual studio.

我是vsts帐户的管理员,拥有所有权利.如果还有其他方法可以使用PAT令牌对TF.exe进行身份验证,那么它也可以正常工作.

I am an admin of the vsts account and have full right on everything. If there are other ways of doing this possibly authenticate TF.exe using PAT token that would work as well.

我将再次使用tf.exe进行自动构建的检入命令. 解决该问题的任何帮助将不胜感激.

I would use tf.exe again for a checkin command from automated builds. Any help in solving this would be appreciated.

推荐答案

There is the Check in changes task in TFVC Build Tasks extension that you can use it to check in changes. Also, you can call TF command to check in changes during the build process, it uses build service account.

另一方面,您可以创建一个控制台应用程序以通过TFS API检入更改(

On the other hand, you can create a console application to check in changes through TFS API (Workspace.CheckIn method), then call this app through command line.

这篇关于tf.exe对vsts进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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