Git Synchronization in Azure DevOps

I’m building out a PoC here for replacing our current automation platform with UA, and looking to utilize an integration with a Git repo either in ADO on-prem or cloud. As it stands right now when I set up with a username and password (which, honestly I’d much rather not do. I don’t think it would be super difficult to have a one time graphical authentication, or token based auth integrated into the UI for initial configuration) this is what I’m seeing in the logs:

2020-08-28T13:18:05.1160293-04:00  [ERR] Failed to sync: "too many redirects or authentication replays" "   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
   at LibGit2Sharp.Core.Ensure.ZeroResult(Int32 result)
   at LibGit2Sharp.Core.Proxy.git_remote_fetch(RemoteHandle remote, IEnumerable`1 refSpecs, GitFetchOptions fetchOptions, String logMessage)
   at LibGit2Sharp.Commands.Fetch(Repository repository, String remote, IEnumerable`1 refspecs, FetchOptions options, String logMessage)
   at LibGit2Sharp.Commands.Pull(Repository repository, Signature merger, PullOptions options)
   at UniversalAutomation.Git.GitService.Pull() in D:\a\universal\universal\src\UniversalAutomation.Git\GitService.cs:line 225
   at UniversalAutomation.GitSyncService.TrySync() in D:\a\universal\universal\src\UniversalAutomation\Services\GitSyncService.cs:line 83
   at UniversalAutomation.GitSyncService.Sync() in D:\a\universal\universal\src\UniversalAutomation\Services\GitSyncService.cs:line 54" (2d6ed692)

We need to better document this but you can also use a PAT instead of a user\password. The PAT would go in the password field and the username could be whatever.

That said, I’m not exactly sure why this error is happening. I’ve added an issue to investigate. We’re using lib2git to sync with git so it might have something to do with this: https://stackoverflow.com/questions/26145023/libgit2sharp-fetching-fails-with-too-many-redirects-or-authentication-replays

1 Like

Awesome, thank you for the info! I’ll give the PAT option a try and see if the issues persist

The PAT worked, and I’m not currently seeing any issues in the logs.

Hi,
we are currently facing the same issue and I think. Here´s what I think what happened:

  1. Everything was working fine with Azure-DevOps and a PAT
  2. We´ve Updated from 2.8.0 to 2.9.x and the appsettings.json was overwritten
  3. We´ve configured it (appsettings.json) again with a regenerated PAT
  4. since then we are getting this error

I´ve already tried to remove the repo folder und to sync from scratch, but it didn´t worked neither.

Any guesses ?

Thanks