2

I have installed msysgit for windows 8. I am attempting to automate a git pull every 5 minutes. I am using scheduled tasks to run a script I wrote. The schedule task's action is:

powershell -ExecutionPolicy Bypass File C:\Path\To\Git\Script.ps1

The script file mentioned above contains:

cd C:/Path/To/Git/Repository
git pull

When I run this script as a local user, it works successfully. However when I switch it to run as system, it appears to run successfully but it does not. The scheduled task runs successfully but the repository does not pull in new code.

Does anyone have any suggestions for running this task silently and successfully in the background?

6
  • Why do you want to give SYSTEM privileges to third-party software that certainly doesn't need them?
    – grawity
    Commented May 6, 2013 at 21:25
  • Try it running as you, but check the "Hidden" checkbox.
    – Mark Allen
    Commented May 6, 2013 at 22:39
  • @grawity not ideal but ssh key tied to that computer only has read access to the git repo
    – bacord
    Commented May 7, 2013 at 1:05
  • @MarkAllen It works if I run it as the local user, but the "hidden" checkbox does not hide the window. The hidden checkbox doesn't seem to change it at all.
    – bacord
    Commented May 7, 2013 at 1:08
  • 2
    Weird. Well, make a new user account, configure it to run as that user, even when not logged on (which should be an option.). Then log off and back on as yourself.
    – Mark Allen
    Commented May 7, 2013 at 4:23

1 Answer 1

-1

because youre not authenticated as the github user on the system account

1
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Oct 21, 2022 at 15:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .