Git Sync - no license/no empty folder

Product: PowerShell Universal
Version: 2.3.0 (nightly build 9/8)

I think I am having a chicken and an egg problem with GIT. I have been doing a lot of playing around with it and here is what I am seeing.

I setup a brand new server today (2019). Installed PowerShell Universal and setup my appsettings.json to point to a brand new, blank repository in Github (just has the readme).

Start up and I get an error message that GIT sync won’t work until I license it. I install my license and then wait a bit and I get the error that my repository folder isn’t empty. The only thing in there is the new license.ps1.

I have gotten some other ones setup with GitHub, so not sure why I am having issues like this. Am I doing something in the wrong order?

We tried to mitigate this by avoiding the license check for the first sync so that any license files could be retrieved. Honestly, I might just remove license enforcement on git sync since it seems to be a hassle.

One thing I would suggest would be creating a bare repository (no to see if that works for you.

I ended up getting this working. I went back and installed v2.2.1. That got the initial sync working. I then was able to upgrade to 2.3 (nightly build) and the rest of the files started syncing at that time. It just seemed like I couldn’t get the initial sync going with 2.3 for some reason.

Just upgraded out test to 2.3.0 and running into the error page under settings/git

Git synchronization is disabled

You can enable git synchronization in appsettings.json. Git sync requires a PowerShell Universal license.

This box does have a valid license installed. Any ideas?


And git sync is enabled in appsettings.json? I just double checked in my environment and this error page isn’t showing.

:man_facepalming: I bet appsettings.json got overwritten at some point. This is my upgrade test box and not sure when it quit working. This instance I usually just run the .MSI and didnt back it up…

Sorry to scare you @adam

It’s ok. I’m always scared. :stuck_out_tongue: