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.