私は git-tfs を使用して TFVC リポジトリを操作しました。他のプロジェクトの作業を開始しましたが、プロジェクトのコードは別のサーバーでホストされています。
リポジトリのクローンを作成しようとすると、エラーが発生するようになりました。
git tfs clone http://tfs-server:8080/tfs $/CompanyName/Dev
資格情報を 2 回入力するように求められます。その後、エラーが表示されます。
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 Foundation Server 2013です。私のgit-tfsバージョンは
git-tfs version 0.21.0.0 (TFS client library 12.0.0.0 (MS)) (64-bit)
同様のエラーが発生するいくつかの質問を見つけて、その回答を試しました。だから、これらは私がやろうとしたことです:
- Visual Studio のブラウザーでこのサーバーからログオフします。
- Internet Explorer のキャッシュのクリーニング
- C:\Users\UserName\AppData\Local\Microsoft\Team Foundation\5.0\Cache フォルダーを削除します。
- Internet Explorer のローカル イントラネット セキュリティ ゾーンに tfs サーバーを追加します。
これはデバッグ出力です:
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-tfs フローを元に戻すにはどうすればよいですか?