On Mon, 11 Nov 2013 20:41:51 -0800 (PST)
Ray Tayek wrote:
> > hi, i have git version 1.8.4.msysgit.0 installed.
> > if i run this as a daemon, where are the repositories located?
> > (i.e. where do i do a mkdir foo.git; cd foo.git; git init --bare?)
[...]
> doing a push origin master got an acces denied or repository not
> exported. so i added --enable=receive-pack to the deamon invocation.
Are you aware that enabling this mode allows everyone to push
arbitrary data into your repository without any authentication?
Let me repeat: no authentication is supported by git-daemon, and that's
why you have to jump through the hoops to even allow (the usual)
read-only access by this daemon to a repository, and enabling write
access requires a special command-line option.
In other words, this kind of setup is reserved for special cases in a
controlled environment.
> now push origin master says:
> counting objects: 3 done
> writing objects: 100% (3/3)
>
> and then hangs :(
This is a known bug in Git for Windows [1] which turned out to be
incredibly hard to track down. Since no one pushes to git-daemon
anyway, the bug is still not fixed.
It has been discovered that disabling a certain feature known as
"side-band-64k" push protocol extension [2] helps (see comments #1 and
#2 in [1]).
So to help the problem you basically have several options:
1) Host your shared Git repos on a box running an OS "native" to Git,
such as something implementing POSIX (GNU/Linux, *BSD, Darwin etc).
This will make setting up "conventional" server-side Git setup
basically a no-op as a working SSH server is just one package
install away. Setting up Git behind an HTTP server is more
complicated but well documented. You could also opt for using
some front-end to virtualize Git users if SSH is used for providing
access; the most popular is gitolite [9].
IMO, in our brave new world full of cheap virtualization, this is
*the* way to go: just grab an OS [3] and install it in on a
virtualised server. A VPS/VDS is also an option.
2) Continue to use Windows as a hosting platform but stop using
git-daemon. There are guides on setting up a Git server behind
IIS using nothing but bare hands, but special solutions for this
do exist [6], [7].
Another solution is to use gitblit [8] -- it does not use Git for
Windows on the server at all relying instead on a pure Java library
called JGit.
3) Build Git for Windows from the source (it's free software, so it
comes with full source code and a development environment to build
it -- *this* is what really called "msysGit" [4]), having disabled
that side-band-64k feature. I don't know how to disable it for sure,
so have no off-hand solution to this.
4) Attempt to binary-patch Git [5] to disable the offending feature
(on the client *or* the server, not on both).
This actually breaks the push protocol -- the parties will present
a differing names for the same feature and so it won't be negotiated.
IMO, this stinks. And you'll have to repeat patching after
installing a new version.
> git log says: fatal: bad default revision 'HEAD'
You failed to tell us where you're running this -- on the client
or on the server?
1. http://code.google.com/p/msysgit/issues/detail?id=457
2. https://github.com/git/git/commit/a886ba2
3. http://www.debian.org
4. http://code.google.com/p/msysgit/downloads/list?q=net+installer
5. http://billauer.co.il/blog/2012/10/git-pull-windows-freeze-receive-pack/
6. http://gitweb.codeplex.com/
7. https://bonobogitserver.codeplex.com/
8. http://gitblit.com/
9. https://github.com/sitaramc/gitolite/
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.