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