How do I start the git daemon on Windows in order to allow it to begin serving requests? Seems like msysgit is supposed to install it as a Windows Service or something but I don't see one.
Git for Windows 1.7.4 includes support for git daemon on windows which was missing in previous versions. To export your repository you will need to create a file called git-daemon-export-ok in the .git directory or include the --export-all command line option.
In a git repository run:git daemon --export-all
and you can then connect to it from a remote machine eg: git ls-remote git://yourmachine/path/to/repo
git daemon --base-path=/c/Users/Tyler/workplace
. Then, assuming your repo is in C:\Users\Tyler\workplace\src\CoolProject
, you can try git ls-remote git://yourmachine/src/CoolProject
. –
Forget You could use SCM-Manager instead of git daemon.
With Git 2.34 (Q4 2021), as part of the new built-in fsmonitor, starting a Git daemon on Windows will be easier:
See commit 05881a6, commit fdb1322, commit 8750249, commit 9bd51d4, commit a3e2033, commit 64bc752 (20 Sep 2021) by Jeff Hostetler (Jeff-Hostetler
).
See commit 59c9232 (20 Sep 2021) by Carlo Marcelo Arenas Belón (carenas
).
(Merged by Junio C Hamano -- gitster
-- in commit af303ee, 13 Oct 2021)
simple-ipc/ipc-win32
: add Windows ACL to named pipeSigned-off-by: Jeff Hostetler
Set an ACL on the named pipe to allow the well-known group EVERYONE to read and write to the IPC server's named pipe.
In the event that the daemon was started with elevation, allow non-elevated clients to communicate with the daemon.
I've had an issue with this same problem. So I spent my Saturday (because I have no life) putting together a solution :)
I've uploaded self-contained .NET Core worker app that can be installed as a windows service here.
Currently, it's very basic and will configure the Daemon to read-only, if you want to be able to push back where-ever your git remote is hosted, add the tag --enable-receive-pack to line 9 in worker.cs and recompile.
To broadcast a specific location on your host, on the same line, add --base-path=C:\Path\To\Repo.
I'll probably make some improvement on this in the future for extra configurability :)
**edit: Needs git installed on the host machine.
© 2022 - 2025 — McMap. All rights reserved.