tags:

views:

42

answers:

1

Hi all,

I have just setup git-http-backend on a WS2008 machine using Apache and Basic Auth for pull and push.

I can create a bare repository on the hosting server and clone it down with git clone http://[email protected]/repositories/Test.git

This works fine, I can add files and push them back. That all works great. I thought I had it all working!

I am now trying to put a few of my projects in (C# .net stuff). I first tried just copying the .git directory and putting that on the server which seemed to have issues. So I thought I would create a bare repo, clone it to local machine, copy in files then commit and push back to server. All seems to work until I try and push my sln file. At that point it goes through the compression and writing objects etc but errors with:

error: RPC failed; result=22, HTTP code = 417
fatal:  The remote end hung up unexpectedly
fatal:  The remote end hung up unexpectedly

In the Apache server error Log I have:

fatal: Needed a single revision
fatal: Needed a single revision

The only thing I can see in the access.log is:

192.168.10.96 - - [22/Oct/2010:23:06:06 +0100] "GET /repositories/CodeTest.git/info/refs?  service=git-receive-pack HTTP/1.1" 200 153

After this point I can not longer get it to push even if I remove the sln file. I am new to GIT and pretty confused as to what might be happening under the hood here.

Any help or advice would be great.

EDIT so I can create a text file and rename it to test.sln and that works. But if I create a text file and copy the contents of the sln file it will fail again.

EDIT 2 Looks like it is not just SLN files but some of the files within a project / solution. I have a solution that has multiple projects so I choose a single project that only had a few files and no SLN (did have proj file). This also failed.

I am beginning to feel it could be an encoding issue or a line termination with files created by VS2010 or something. Not sure how to test this though.

EDIT 3 It looks like it is large files that can't be pushed. I tried this on both client and server config but it didn't fix it.

EDIT 4 If I do everything on the server it self, create a new repo, clone empty repo, copy all files to new clone, git add and git commit then git push it all works. This would suggest a network or timeout issue. The clone I did was http://user@localhost.

EDIT 5 So it looks like the problem is with my network setup. I have one external IP so all HTTP traffic comes into an Apache Linux box, most of my site is served from there but some uses other boxes so it uses proxy pass reverse to serve the content. I have a subdomain "git.myserver.com" for this. Apache on the GIT server is actually on port 8000, if I open port 8000 on the external firewall and point it directly at the GIT server it works. So I can only assume somewhere in the first apache server it is dieing. just to confirm the fatal error is almost instant, so timeouts seem less likely. Maybe the proxy pass reverse rewrites something, but why it only affects larger files is a mystery.

EDIT 6 in the apache proxy server error.log I get:

[Mon Oct 25 11:41:06 2010] [error] (103)Software caused connection abort: proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97)
[Mon Oct 25 11:41:06 2010] [error] proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97) from 62.133.24.54 ()

so it is looking like either the proxy it self fails or something on that machine thinks its bad.

Thanks

A: 

why don't you just use file shares? You don't need to go over http with git.

adymitruk
for any number of reasons. It is my central repo, it needs to be available across the web. it provides a web interface to be able to intergrate things easily.
Jon