git-auto-sync icon indicating copy to clipboard operation
git-auto-sync copied to clipboard

Deamon registration fails on Windows 11

Open millokeller opened this issue 2 years ago • 8 comments

I ran git-auto-sync d add <repo> and I am getting:

Installing git-auto-sync as a daemon
Starting git-auto-sync-daemon
2022/05/15 13:54:16 The dependency service does not exist or has been marked for deletion.

I checked for the process called git-auto-sync-daemon, but there is none.

I am using git-auto-sync on Windows 11 and manual synchronization works.

millokeller avatar May 15 '22 12:05 millokeller

Thanks for filling this.

I've mostly only tested this on MacOS, and Linux. I haven't used Windows in some ... 14 years. I'll download it, and try it run it over there :)

vHanda avatar May 15 '22 17:05 vHanda

This issue is due to the dependencies on network-online.target and syslog.target services, which do not exist on Windows. (https://github.com/GitJournal/git-auto-sync/blob/master/common/service.go#L46).

You can verify this by running:

sc qc git-auto-sync-daemon

Look for the DEPENDENCIES line.

To manually fix the service, open Command Prompt as Administrator and run:

sc config git-auto-sync-daemon depend= /
sc start git-auto-sync-daemon

The service should start.

nithinphilips avatar Jun 08 '22 14:06 nithinphilips

I've just released version 1.5 without the dependencies. Could you please confirm that it works for you?

(Maybe then I'll try to find an hour or two to create a proper installer for windows and try to get it into winget)

vHanda avatar Jun 10 '22 19:06 vHanda

@vHanda This solves the issue. Thank you!

git-auto-sync daemon add now gives this output and the service appears to be running:

...
Installing git-auto-sync as a daemon
Starting git-auto-sync-daemon

There is no longer an error message about the dependency.

nithinphilips avatar Jun 15 '22 20:06 nithinphilips

For me this tool is still not doing the trick. I am facing multiple issues. I wiped all data from the initial installation and did a fresh registration of the daemon (Windows Service). The installation seems to work and the daemon appears up and running now. But there is still no synchronization. Neither for new added files, nor for changes in existing files. I have been waiting for over 20 Minutes to verify this. What am I missing?

millokeller avatar Jul 05 '22 05:07 millokeller

If I run the commands as admin, it will run the daemon and status works as expected.

However, commits are still not done.

git-auto-sync.exe sync command works fine and pushes/pulls as expected.

Nimja avatar Sep 08 '22 10:09 Nimja

Facing the same issue with the v1.5 release on Windows 10. The daemon status reports the directory is properly monitored, the manual sync works, but it has to happen manually.

Arty2 avatar Apr 17 '23 17:04 Arty2

Same for me on Windows 10. Manual sync works as expected. I have to add the folder to the daemon as admin and the daemon appears to start and monitor the folder, but it doesn't actually ever do commits.

sudo-robot-destroy avatar Jul 30 '24 12:07 sudo-robot-destroy