Recenlty reconnected our Gitlab repo back up as a PushOnly connection. It showed a successful sync for changes made since it was disconnected, but now it fails every minute and throws this error in the logs
2022-05-02 23:59:18.948 -04:00 [ERR] Failed to sync: too many redirects or authentication replays at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Proxy.git_remote_push(RemoteHandle remote, IEnumerable`1 refSpecs, GitPushOptions opts) in /_/LibGit2Sharp/Core/Proxy.cs:line 2253
at LibGit2Sharp.Network.Push(Remote remote, IEnumerable`1 pushRefSpecs, PushOptions pushOptions) in /_/LibGit2Sharp/Network.cs:line 381
at LibGit2Sharp.Network.Push(IEnumerable`1 branches, PushOptions pushOptions) in /_/LibGit2Sharp/Network.cs:line 240
at UniversalAutomation.Git.GitService.Push() in D:\a\universal\universal\src\Universal.Server\Services\GitService.cs:line 306
at UniversalAutomation.GitSyncService.TrySync() in D:\a\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 178
at UniversalAutomation.GitSyncService.Sync() in D:\a\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 102
This error is a bit misleading. It typically means something is wrong with the credentials.
There is an outstanding issue on the lib2gitsharp repo about this. Some mention that reverting to an older version worked for them. PSU is using the latest version: 0.27.0-preview-0182.
I just verified the credentials work correctly in the webUI for GitLab (copied and paste the username and password directly from the appsetttings.json).
I removed the dedicated Universal Credentials for Git and used my account and still get the same error.
Just had this issue as well with Github, I tried all the above with no luck. I ended up needing to nuke the local repo and generate a new Github token then re-sync everything with PSU.