连接TeamCity的到TFS [英] Connecting TeamCity to TFS
问题描述
我挣扎想我的TeamCity项目连接到我的TFS的项目。我尝试了一堆东西,但我总是得到同样的错误:
I'm struggling trying to connect my TeamCity project to my TFS project. I tried a bunch of stuff, but I always get the same error:
TFS failed. ExitCode: 111, command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe @@C:\TeamCity\temp\TC-TFS-25-7939_109\command.params, in file: {https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity, /hash:S, /noProxy, C:\TeamCity\temp\TC-TFS-25-7939_108.result, ConnectionTest, $/TesteTeamCity/TesteTeamCity}, completed in: 1 second(s)
stdout: TFS Native Verifier v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
Running under .NET Framework 4.0.30319.18052
INFO -
INFO - Use Team Explorer 2012
INFO -
TFS Native Accessor v8.0 Copyright (C) 2006-2013 JetBrains s.r.o.
INFO - Connecting to server https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity
INFO - WebProxy is disabled
Connection test:
Server='https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity'
Root='$/TesteTeamCity/TesteTeamCity'
ERROR - TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity.
System.Exception: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/TesteTeamCity.
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.EnsureTokenProvider(HttpWebResponse webResponse)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
em Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
em Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
em Microsoft.TeamFoundation.Framework.Client.Registration.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetInstanceId()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService.get_InstanceClientCacheDirectory()
em Microsoft.TeamFoundation.Framework.Client.RegistrationService..ctor(TfsTeamProjectCollection tfsObject)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.CreateServiceProxy(Type serviceType)
em Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.GetServiceInstance(Type serviceType, Object serviceInstance)
em Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
em Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
em Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
em JetBrains.TeamCity.Tfs.Command.Do() na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Command.cs:linha 28
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 134
--- Fim do rastreamento de pilha de exce‡äes internas ---
em JetBrains.TeamCity.Tfs.Program.Main(String[] args) na c:\BuildAgent\work\23f504c63c17dfdf\TfsNativeAccessor\src\Program.cs:linha 438
我总是得到错误:
I always get the error:
您没有权限访问/ DefaultCollection /
'You are not authorized to access /DefaultCollection/'
我在对TFS的一切管理权限,我不知道如果我错过的TeamCity的一些authorizantion配置。
I have admin rights in everything on the TFS and I don't know if I'm missing some authorizantion configuration on the TeamCity.
有没有人有任何想法,为什么发生这种情况?
Does anyone have any idea why this is happening?
推荐答案
我终于设法得到TeamCity的最新版本的工作(这对我来说是8.0.3),但显然这一直以来的工作版本的 7.1.4 。
I finally managed to get this working in the latest version of teamcity (which for me is 8.0.3) but apparently this has been working since version 7.1.4.
-
首先配置TFS 备用凭据
(配置文件 - >凭证 - >启用备用凭据)
First configure alternate credentials in TFS (profile -> credentials -> enable alternate credentials)
然后在TeamCity的
Then in TeamCity
- 使用以下URL格式:的https:// {} yournamehere .visualstudio.com / DefaultCollection
- 对于用户名在步骤1中使用您备用凭据名称设置,但把它放在下面的格式为 ## LIVE ## \\ usernamehere (它实际上告诉你这下面的方框中,但我有点错过了第一次!)
- Use the following URL format: https://{yournamehere}.visualstudio.com/DefaultCollection
- For the username use the alternate credential name you setup in step 1. BUT put it in the following format "##LIVE##\usernamehere" (It actually tells you this below the box, but I somehow missed it first time!)
希望这可以帮助其他人,因为我浪费了相当多的时间在这!
Hope this helps someone else, as I wasted quite a bit of time on this!
这篇关于连接TeamCity的到TFS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!