Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

[Otter] Unable to connect to TFS Git with authentication



  • Hi.

    I'm trying to create Raft using TFS git and I'm getting following error

    [LibGit2SharpException: Too many redirects or authentication replays]
       LibGit2Sharp.Core.Ensure.HandleError(Int32 result) +391
       LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts) +57
       LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options) +660
       Inedo.Otter.Extensions.RaftRepositories.ExternalGitRaftRepository.OpenRepository() +512
       System.Lazy`1.CreateValue() +709
       System.Lazy`1.LazyInitValue() +191
       Inedo.Otter.Extensions.RaftRepositories.<GetRaftItems>d__23.MoveNext() +109
       System.Linq.WhereEnumerableIterator`1.MoveNext() +124
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +452
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +69
       Inedo.Otter.WebApplication.Pages.Administration.Rafts.RaftContentsPageBase`1.CreateChildControls() +1011
       Inedo.Web.PageFree.SimplePageBase.ProcessRequest(HttpContext context) +83
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +859
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +98


  • This error will occur if there are invalid credentials used with VSO/TFS.

    Make sure to use an ACCESS TOKEN (not your password).



  • Just a follow-up, access tokens are not supported by on-premises TFS (2015 update 3). So right now, there is no way to use Git repositories hosted in on-premises TFS for Otter. I know it is technically possible, TeamCity and other tools can use TFS hosted Git repos. I think Otter will have to implement a different way to authenticate with TFS (perhaps how TeamCity does it would offer insight?)



  • Thanks for the additional information; we've research a bit further, and it would appear that TFS uses Basic Authentication.

    According to Microsoft Support and this article on cross-platform TFS2015 on prem, to be able to access GIT repository in TFS on premises:

    • Enable basic authentification on "team foundation server\tfs" in IIS
    • Set Authentification to NTLM in TFS Administration Console

    Can you try that, and let us know if it works?



  • I have the same problem. I've tried all that you had recommended (about security options) - still no luck.



  • I was able to get Otter to work with TFS Git on-premises. All I needed to do was set the Otter website and service to run as a specific domain user that has rights to the TFS Git repository. Then in the Raft settings, leave the username and password empty. The Otter code will use the "DefaultCredentials" in LibGit2Sharp., which are the credentials of the currently executing service user. This is slightly sub-optimal, but it works. The next thing I would like to understand is why Git rafts are so slow (going to assets is fairly slow to load, ~10 sec)

    P.S. I never tried setting the "Basic Authentication" in TFS you recommended, as it is a fundamental change that could affect other users and services.



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation