Connecting TFS to TeamCity

爱⌒轻易说出口 提交于 2019-12-24 13:43:02

问题


I'm trying to connect my TeamCity project to my TFS project with a free account (a windows live account). But I'm having a little bit a trouble doing this. I'm getting the error TF30063 (You are not authorized to access /DefaultCollection/). I've tried a lot of things, I even follow the instruction of this question -http://youtrack.jetbrains.com/issue/TW-20909-, but no luck...

I already have: - Set admin permission to all members to my TFS project - Put the project on my computer in a public folder - Checked every url, user and password inputs on the TeamCity config page - Tested in more than one TFS account - Checked if all projects were in the same domain - I've tested in a network that doesn't uses proxy and one that does

Neither of these configuration seem to make a difference... The only lead I have to why this problem is happening is because I'm using the Windows Live (free) TFS account and not a paid licensed one... Can that be it?

Any help would be appreciated... Cheers!

Here is the full error:


Failed for the root 'DimasTeste' #16: TFS failed. ExitCode: 111, command: C:\TeamCity\webapps\ROOT\WEB-INF\plugins\tfs\bin\tfs-native.exe @@C:\TeamCity\temp\TC-TFS-108-6176_396\command.params, in file: {https://budiedimas.visualstudio.com/DefaultCollection/, /user: /password: /hash:S, /noProxy, C:\TeamCity\temp\TC-TFS-108-6176_393.result, GetCurrentVersion}, completed in: 2 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/ INFO - WebProxy is disabled Get current version: Server='https://budiedimas.visualstudio.com/DefaultCollection/' Username='dimas_budie@hotmail.com' ERROR - TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/. System.Exception: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access https://budiedimas.visualstudio.com/DefaultCollection/. 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 143 --- 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


回答1:


You should enable alternate credentials (basic authentication) for your account.

http://tfs.visualstudio.com/en-us/news/2012-aug-27/

Go to your profile -> credentials -> enable alternate credentials. Then use them in TeamCity.




回答2:


Team Foundation Service is supported only on TC 7.1.4+. Which version are you running?

http://blogs.jetbrains.com/teamcity/2013/02/07/teamcity-7-1-4-build-24331-is-ready/comment-page-1/#comment-38321



来源:https://stackoverflow.com/questions/18472846/connecting-tfs-to-teamcity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!