threads / discuss / 23643

git daemon on Windows environment

Subject: git daemon on Windows environment

## tl;dr

4 messages between Apr 29, 2010 and May 1, 2010.

replies: 3people: 4as markdown or json

santos2010· Apr 29, 2010, 09:07 UTC · lore
Hello,

I tried to install git daemon on a Windows Server 2003 using cygrunsrv, but got this error: cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:

I googled and found a possible fix:
 " explicitly add Full Control for the SYSTEM user to
  C:\Cygwin
  C:\Cygwin\var
  C:\Cygwin\var\log "

However this didn't help as well. Anyone has experience with this installation? Any tips?

Thanks ina advance,
Santos
-- 
View this message in context: http://git.661346.n2.nabble.com/git-daemon-on-Windows-environment-tp4979038p4979038.html
Sent from the git mailing list archive at Nabble.com.
Tim Visher· Apr 30, 2010, 21:34 UTC · re: santos2010 · lore

Re: git daemon on Windows environment

On Thu, Apr 29, 2010 at 5:07 AM, santos2010 <santos.claudia2009@googlemail.com> wrote:

Show 19 quoted lines
>
> Hello,
>
> I tried to install git daemon on a Windows Server 2003 using cygrunsrv, but
> got this error:
> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>
> I googled and found a possible fix:
>
>  " explicitly add Full Control for the SYSTEM user to
>
>  C:\Cygwin
>  C:\Cygwin\var
>  C:\Cygwin\var\log "
>
> However this didn't help as well.
> Anyone has experience with this installation? Any tips?
>
> Thanks ina advance,

As far as I know, git --daemon is explicitly not supported in Windows environments. At least that was the case not too long ago.

If you're running git --daemon because of its efficiency, have you considered the fact that [smart-http][] is almost as efficient? That should work in any http server, a plethora of which exist for Windoze.

Also, file system cloning is very efficient so if you're trying to share a repository you could in theory share over the file system using filesystem permissions to allow for cloning.

Just food for thought.
[smart-http]: http://progit.org/2010/03/04/smart-http.html
-- 
In Christ,

Timmy V.

http://burningones.com/
http://five.sentenc.es/ - Spend less time on e-mail
Avery Pennarun· Apr 30, 2010, 21:44 UTC · re: Tim Visher · lore

Re: git daemon on Windows environment

On Fri, Apr 30, 2010 at 5:34 PM, Tim Visher <tim.visher@gmail.com> wrote:
> As far as I know, git --daemon is explicitly not supported in Windows
> environments.  At least that was the case not too long ago.

git daemon works perfectly fine in cygwin. I've heard that the msysgit one doesn't necessarily work, but that may have been fixed.

I haven't tried using the git daemon as a service, though; I mostly use it as an ad-hoc thing to easily let me exchange branches with my co-workers before they're ready to be pushed into the "real" server, thus it doesn't matter much if git-daemon doesn't restart on boot. So I can't help with the original poster's problem.

> If you're running git --daemon because of its efficiency, have you
> considered the fact that [smart-http][] is almost as efficient?  That
> should work in any http server, a plethora of which exist for Windoze.

That's about 10000 times harder than running 'git daemon' from the command line, though, if all you want is ad-hoc sharing.

Your suggestion is probably a good one for setting up a "real" Windows git server; setting up a Windows ssh server should also work. We just use a Linux server at work, even for our Windows users, and life is fine.

> Also, file system cloning is very efficient so if you're trying to
> share a repository you could in theory share over the file system
> using filesystem permissions to allow for cloning.

Hmm, in my experience, git cloning over NFS/SMB is kind of crappy; using a real git server is much faster. This is because of latency: the client doesn't know which bytes to read until it reads some of the other bytes, so there's a lot of back-and-forth communication. The "real" git protocols (like git daemon, smart http, ssh server, etc) let the server make these decisions and can thus go much faster.

Have fun,
Avery
Jon Seymour· May 1, 2010, 04:17 UTC · re: santos2010 · lore

Re: git daemon on Windows environment

On Thu, Apr 29, 2010 at 7:07 PM, santos2010 <santos.claudia2009@googlemail.com> wrote:

Show 17 quoted lines
>
> Hello,
>
> I tried to install git daemon on a Windows Server 2003 using cygrunsrv, but
> got this error:
> cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
>
> I googled and found a possible fix:
>
>  " explicitly add Full Control for the SYSTEM user to
>
>  C:\Cygwin
>  C:\Cygwin\var
>  C:\Cygwin\var\log "
>
> However this didn't help as well.
> Anyone has experience with this installation? Any tips?

I run git-daemon as a Windows service under cygrunsrv and it works pretty well for me.

I'd double check that you can launch git daemon with the arguments you have registered with cygrunsrv (use cygrunsrv -LV to see these).

Also, check any output that might be in /var/log/git-daemon.log. Make sure, of course, that you don't have another copy of git-daemon running when you start the Windows service.

jon.

← back to recent threads