Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    tfsauthenticationgitotter
    6 Posts 1 Posters 127 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      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
      
      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

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

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

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          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?)

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                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.

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation