Я использовал git-tfs для работы с хранилищем TFVC. Я начал работать над другим проектом, а код проекта размещен на другом сервере.git-tfs возвращает «(401) несанкционированную ошибку при клонировании репозитория
Теперь я получаю ошибки, когда пытаюсь клонировать репозиторий.
git tfs clone http://tfs-server:8080/tfs $/CompanyName/Dev
Он предлагает мне ввести учетные данные дважды. Затем он показывает ошибку.
TF30063: You are not authorized to access http://tfs-server:8080/tfs.
The remote server returned an error: (401) Unauthorized.
Я проверял дважды, это правильный url. Я могу подключиться к Visual Studio и с браузером.
Я дважды проверял, что это правильный пароль и имя пользователя. Я могу войти в систему с этими учетными данными в браузере.
Я могу клонировать код с другого сервера на моей машине.
Сервер Visual Studio Team Server Foundation 2013. Мой мерзавец-ТПО версия
git-tfs version 0.21.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)
Я нашел несколько вопросов с подобной ошибкой и попытался ответы. Так вот что я делал:
- Выход с этого сервера в браузере Visual Studio;
- Очистка кеша Internet Explorer
- Удаление папки C: \ Users \ имя_пользователя \ AppData \ Local \ Microsoft \ Team Foundation \ 5.0 \ Cache;
- Добавление сервера tfs в зону безопасности локальной интрасети в Internet Explorer.
Это отладочный вывод:
git tfs clone http://tfs-server:8080/tfs $/CompanyName/Dev --debug
Command run:git tfs clone http://tfs-server:8080/tfs $/CompanyName/Dev --debug
No authors file used.
git-tfs version 0.21.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)
git command: Starting process: git init
Initialized empty Git repository in C:/Users/UserName/Dev/.git/
git command time: [00:00:00.0660000] init
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access http://tfs-server:8080/tfs. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
--- End of inner exception stack trace ---
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.ReadResponse(HttpWebResponse webResponse, WebException webException)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequest()
at Microsoft.TeamFoundation.Client.Channels.TfsHttpRequestChannel.Request(TfsMessage message, TimeSpan timeout)
at Microsoft.TeamFoundation.Client.Channels.TfsHttpClientBase.Invoke(TfsClientOperation operation, Object[] parameters, TimeSpan timeout, Object[]& outputs)
at Microsoft.TeamFoundation.Framework.Client.RegistrationProxy.GetRegistrationEntries(String toolId)
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.GetInstanceId()
at Microsoft.TeamFoundation.Framework.Client.RegistrationService.get_InstanceClientCacheDirectory()
at Microsoft.TeamFoundation.Framework.Client.RegistrationService..ctor(TfsTeamProjectCollection tfsObject)
at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.CreateServiceProxy(Type serviceType)
at Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.FindServiceLocation(String serviceType, String toolId)
at Microsoft.TeamFoundation.Framework.Client.PreFrameworkServerDataProvider.LocationForCurrentConnection(String serviceType, Guid serviceIdentifier)
at Microsoft.TeamFoundation.Client.TfsConnection.EnsureProviderConnected()
at Microsoft.TeamFoundation.Client.TfsConnection.EnsureAuthenticated()
at Sep.Git.Tfs.VsCommon.TfsHelperBase.EnsureAuthenticated()
at Sep.Git.Tfs.Core.GitTfsRemote.EnsureTfsAuthenticated()
at Sep.Git.Tfs.Core.GitRepository.CreateTfsRemote(RemoteInfo remote, String autocrlf, String ignorecase)
at Sep.Git.Tfs.Commands.Init.Run(String tfsUrl, String tfsRepositoryPath)
at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, String gitRepositoryPath)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 args)
at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs)
at Sep.Git.Tfs.Program.Main(String[] args)
TF30063: You are not authorized to access http://tfs-server:8080/tfs.
The remote server returned an error: (401) Unauthorized.
Что я могу сделать, чтобы получить мой GIT-ТПО поток обратно?
Привет, когда вы ссылаетесь на 'CollectionName', где я могу найти это точно? Im имеет ту же самую проблему :(спасибо – theiOSDude
Это сборник проектов проекта. Если у вас есть доступ к веб-сайту, вы можете найти его в URL-адресе после/tfs/part после совершения переадресации. – filhit
@ burrows111 Также он находится в левом столбце в Connect к окну Team Foundation Server ([screenshot] (http://content.screencast.com/users/filhit/folders/Jing/media/b337d520-3a41-4078-bc95-ccfeac74cbc4/2015-07-10_0855.png)) – filhit