问题描述
我正在尝试从本地TFS迁移到Visual Studio Online.我们有一个非常复杂的TeamCity构建过程,我们不想从中迁移过来,因此让TeamCity与VSO一起工作将是理想的选择.
I'm trying to migrate from on-premises TFS to Visual Studio Online. We have quite elaborate TeamCity build process that we don't want to migrate away from, so having TeamCity working with VSO would be ideal.
我已经创建了备用用户凭据(按照本文),并在TeamCity中使用这些凭据.但是当我在TeamCity中创建新的VCS时,出现连接错误:
I've created alternative user credentials (as per this article) and using these credentials in TeamCity. But when I create new VCS in TeamCity, I get connection error:
TF30063: You are not authorized to access https://myproject.visualstudio.com/DefaultCollection/MyProject
我已经尝试过我的实际凭据(不是替代凭据),但没有任何变化-相同的错误.
I've tried my actual credentials (not alternative ones) but nothing changed - same error.
我还尝试通过tf
命令行工具使用替代凭据,但无法输入替代凭据-弹出一个窗口,询问我的LiveId.
Also I've tried using alternative credentials with tf
command line tool and could not enter alternative credentials - a window popped up, asking me for my LiveId.
有什么办法解决这个问题吗?
Any idea how to fix this?
p.s.这是TeamCity配置的样子:
p.s. this is how TeamCity configuration look like:
推荐答案
要连接到Visual Studio Online,您确实需要在用于Team City的帐户上启用备用凭据.确保至少 Team Explorer 2012 和更新4 .整个Visual Studio 2012(包括Update 4).Team City至少需要更新2,但Microsoft仅支持Visual Studio 2012 RTM和最新更新(更新4).
To connect to Visual Studio Online you indeed need to enable alternate credentials on the account you'll use for Team City. Ensure that at least Team Explorer 2012 and update 4 is installed on the Team City server, install the whole Visual Studio 2012 incl Update 4. Team City requires at least update 2, but Microsoft only supports Visual Studio 2012 RTM and the latest update (which is update 4).
然后在连接屏幕中使用以下信息:
Then in the connection screen use the following information:
存储库URL :https://myaccount.visualstudio.com/DefaultCollection
用户名:##LIVEID##\[email protected]
//您的Visual Studio Online用户名必须与您的LiveId相匹配.
Username: ##LIVEID##\[email protected]
// Your visual Studio Online User Name, must match your LiveId.
密码:*********//您为备用凭据设置的密码.
Password: ********* // The password you setup for the alternate credentials.
您还可以使用VSO服务帐户凭据而不是使用备用凭据.
You can also use the VSO Service Account credentials instead of using Alternate Credentials.
然后在VCS Root配置中,通过以下方式映射TFVC根:
Then in your VCS Root configuration map your TFVC root in the following way:
根:$/MyProject/Path/To/Branch/Root
在 Jetbrains Confluence网站上查看此信息详细信息.
Check out this post on the Jetbrains Confluence site for more details.
这篇关于将TeamCity连接到Visual Studio Online的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!