Problems connecting Azure DevOps (IIS)

Hello everyone,
We’re having trouble connecting our repository to Azure DevOps onprem. We want to access it using PAT.
This is our configuration:

"Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\psu.db",
    "RunMigrations": true,
    "GitRemote": "https://onpremazuredevops/someproject/psu/_git/psu",
    "GitUserName": "somename",
    "GitPassword": "AccESsToKEnin639BlabLA",
    "GitBranch": "master",
    "GitSyncBehavior": "TwoWay",
    "GitInitializeBehavior": "",
    "GitSyncInterval": "1",
    "GitSyncTimeout": 60,
    "ConfigurationScript": "",
    "Mode": "Manual"
  },

The following error message appears:

2025-04-03 10:58:14.124 +02:00 [ERR][UniversalAutomation.GitSyncService] 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.Ensure.ZeroResult(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 172
   at LibGit2Sharp.Core.Proxy.git_remote_fetch(RemoteHandle remote, IEnumerable`1 refSpecs, GitFetchOptions fetchOptions, String logMessage) in /_/LibGit2Sharp/Core/Proxy.cs:line 2289
   at LibGit2Sharp.Commands.Fetch(Repository repository, String remote, IEnumerable`1 refspecs, FetchOptions options, String logMessage) in /_/LibGit2Sharp/Commands/Fetch.cs:line 79
   at LibGit2Sharp.Commands.Pull(Repository repository, Signature merger, PullOptions options) in /_/LibGit2Sharp/Commands/Pull.cs:line 36
   at PowerShellUniversal.Git.GitService.Pull() in D:\a\universal\universal\src\PowerShellUniversal.Git\GitService.cs:line 896
   at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in D:\a\universal\universal\src\PowerShellUniversal.Git\GitSyncService.cs:line 188
   at UniversalAutomation.GitSyncService.Sync(Boolean force, Boolean throwOnFailure) in D:\a\universal\universal\src\PowerShellUniversal.Git\GitSyncService.cs:line 88

This probably indicates an authentication issue.
We tested on vscode, everything works fine with an empty user in vscode.
On the psuniversal side, the following message appears with empty user:

2025-04-03 10:57:22.010 +02:00 [ERR][UniversalAutomation.GitSyncService] Failed to sync: String cannot be empty (Parameter 'name')    at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 54
   at LibGit2Sharp.Identity..ctor(String name, String email) in /_/LibGit2Sharp/Identity.cs:line 21
   at PowerShellUniversal.Git.GitService.Pull() in D:\a\universal\universal\src\PowerShellUniversal.Git\GitService.cs:line 890
   at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in D:\a\universal\universal\src\PowerShellUniversal.Git\GitSyncService.cs:line 188
   at UniversalAutomation.GitSyncService.Sync(Boolean force, Boolean throwOnFailure) in D:\a\universal\universal\src\PowerShellUniversal.Git\GitSyncService.cs:line 88

We also tried to enter the branch via GUI but it has the same behavior.

And to test if it is possible to connect Github.com we entered some test branche which works there too using PAT and any user.
We are looking for a solution? Any ideas? Thank you in Advance

Product: PowerShell Universal
Version: 5.4.2

The only time I’ve gotten authentication replay errors or seen that “too many redirects” error were when I couldn’t log in to the repository when a token expired or if the Git config had become corrupted/typed wrong. You verified that with the same PAT you can log into the Git repo without any issues using a different Git client?

For the record, we’re also using Azure DevOps, but our PSU instance is not using IIS - we’re using the the MSI install.

We had the same issue. It is meant to be fixed in 5.5.0.

As a work around, if you put it all in the remote string and leave the username/password blank it works.

remote: https://PATUSER:PATPASSWORD@github.com/whatever.git