尝试从TFS服务器获取libgit2sharp时收到错误“重定向或身份验证重放次数太多”。
我已尝试过以下文章中的解决方案,但似乎都没有。
LibGit2Sharp: Fetching fails with "Too many redirects or authentication replays"
代码使用DefaultCredentials():
CredentialsHandler credHandler = (_url, _user, _cred) => new DefaultCredentials();
var fetchOpts = new FetchOptions { CredentialsProvider = credHandler };
using (var repo = GetRepository())
{
Remote remote = repo.Network.Remotes["origin"];
repo.Network.Fetch(remote, fetchOpts);
} // using