Git Auto Commit Batch Script - Only Possible with Ignition service running under local admin account?

I have been trying to get the git auto commit on designer save functionality as described in this article: Ignition 8 Deployment Best Practices | Inductive Automation

Unfortunately, it seems like this script does not successfully execute (and perform all required git operations) when the Ignition service is running under its default “Local System” user account. I believe the script does run, as I’ve had it successfully write output to a file, but I can tell none of the git actions are performed.

I have modified this service to run as a local admin (this is an internal development machine) and noted that now everything works as expected.

My questions are as follows:

  • Am I missing something regarding permissions / security settings that should make this possible under the default service account?
  • What are the possible ramifications of changing the service account to a local admin as I have done? We wouldn’t be doing this in a production environment of course, but I want to make sure there aren’t any pitfalls I may have opened in using this workaround
  • The “NOW” variable in the batch script below and in the article seems to not be formatted correctly (it appears literally as “NOW” in the commit message), what’s the correct way to do this in batch scripting?

Basic system info:

  • OS: Windows Server 2016 Standard
  • Ignition Version: 8.1.2
  • git version

Here is the batch script:

echo This has been executed >> execution-log.txt
cd C:\Program Files\Inductive Automation\Ignition\data\projects
NOW=$(date +"%m-%d-%Y %H:%M:%S")
git add .
git commit -m "Designer save at: $NOW"
git push token-origin

Here is the script that runs on gateway update:

import time
system.util.execute(["C:\Program Files\Inductive Automation\Ignition\data\git-auto-commit.bat"])

The Window LOCALSYSTEM service account doesn’t have any network permissions. By default. So git push would be expected to fail.