# git daemon on Windows environment

4 messages from 2010-04-29 to 2010-05-01. Participants: santos2010, Tim Visher, Avery Pennarun, Jon Seymour.
Thread: https://gitlist.dev/t/23643

## santos2010, 2010-04-29 09:07

Subject: git daemon on Windows environment
Message-ID: <1272532026043-4979038.post@n2.nabble.com>
URL: https://gitlist.dev/e/1272532026043-4979038.post%40n2.nabble.com

```

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, 2010-04-30 21:34

Subject: Re: git daemon on Windows environment
Message-ID: <t2jc115fd3c1004301434ofe8970fo2ea933dd450847d7@mail.gmail.com>
URL: https://gitlist.dev/e/t2jc115fd3c1004301434ofe8970fo2ea933dd450847d7%40mail.gmail.com
In-Reply-To: <1272532026043-4979038.post@n2.nabble.com>

```
On Thu, Apr 29, 2010 at 5:07 AM, santos2010
<santos.claudia2009@googlemail.com> wrote:
>
> 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, 2010-04-30 21:44

Subject: Re: git daemon on Windows environment
Message-ID: <j2q32541b131004301444iea34b138v4c34260aa82f8ec8@mail.gmail.com>
URL: https://gitlist.dev/e/j2q32541b131004301444iea34b138v4c34260aa82f8ec8%40mail.gmail.com
In-Reply-To: <t2jc115fd3c1004301434ofe8970fo2ea933dd450847d7@mail.gmail.com>

```
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, 2010-05-01 04:17

Subject: Re: git daemon on Windows environment
Message-ID: <r2s2cfc40321004302117h1e9f4068z442b7018dd640abf@mail.gmail.com>
URL: https://gitlist.dev/e/r2s2cfc40321004302117h1e9f4068z442b7018dd640abf%40mail.gmail.com
In-Reply-To: <1272532026043-4979038.post@n2.nabble.com>

```
On Thu, Apr 29, 2010 at 7:07 PM, santos2010
<santos.claudia2009@googlemail.com> wrote:
>
> 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.

```
