Product: PowerShell Universal
Version: 2.12.4
Hi there everyone,
So at the moment, we have recently installed PowerShell Universal, configured the SSL cert and got it up and running within our Okta environment. Well the next thing I wanted to do was to get it synced up with a new Git Repo (remote). So, I have done the following:
- Created a new remote Repo in our Enterprise Git (powershell.universal)
- Created a new PAT
- Edited the appsettings.json GitRemote, GitBranch, GitUsername (my github email for login), GitPassword (PAT), GitBranch (master), and GitSyncBehavior (TwoWay).
I had deleted all of the contents within the C:\ProgramData\UniversalAutomation\Repository directory including the .universal directory. Before I did that I copied that directory to my remote Repo. I then saved the appsettings.json and restarted the PowerShell Universal service. It restarted just fine and when I logged in and went to the Git section I see the remote repo listed as well as master branch. I also see that it successfully cloned the repo and my roles.ps1 and environments.ps1 configuration scripts are there.
However, the issue I am now running into is that if I make any changes to say, the roles.ps1 script within the PowerShell Universal web console, it does NOT sync with my remote?
Likewise, if I say, on my laptop where I have cloned the remote repo, make a change to the roles.ps1 file and upload that to the remote repo (git push) that does not kick in an update on the PS Universal server?
In the logs I am seeing this:
2022-08-25 11:09:05.569 -04:00 [ERR] Failed to sync: 1 conflict prevents checkout at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in //LibGit2Sharp/Core/Ensure.cs:line 154
at LibGit2Sharp.Core.Proxy.git_checkout_tree(RepositoryHandle repo, ObjectId treeId, GitCheckoutOpts& opts) in //LibGit2Sharp/Core/Proxy.cs:line 229
at LibGit2Sharp.Repository.CheckoutTree(Tree tree, IList`1 paths, IConvertableToGitCheckoutOpts opts) in //LibGit2Sharp/Repository.cs:line 956
at LibGit2Sharp.Repository.FastForwardMerge(AnnotatedCommitHandle annotatedCommit, MergeOptions options) in //LibGit2Sharp/Repository.cs:line 1596
at LibGit2Sharp.Repository.Merge(AnnotatedCommitHandle annotatedCommits, Signature merger, MergeOptions options) in //LibGit2Sharp/Repository.cs:line 1470
at LibGit2Sharp.Repository.MergeFetchedRefs(Signature merger, MergeOptions options) in //LibGit2Sharp/Repository.cs:line 1254
at LibGit2Sharp.Commands.Pull(Repository repository, Signature merger, PullOptions options) in /_/LibGit2Sharp/Commands/Pull.cs:line 38
at UniversalAutomation.Git.GitService.Pull() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 327
at UniversalAutomation.GitSyncService.TrySync() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 152
at UniversalAutomation.GitSyncService.Sync() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 77