I've been beating my head against the wall for days of this one. I'm very new to git, but my work wants to move to it from svn. Git is already setup on the Debian server and was working using shared keys. I have to move it to Apache for our other offices. My first step was to clone the svn repository (they want history). So I ran:
git svn clong http://svnrepo/ and it went perfectly. At this point I can access git via Apache no problem. The problem comes when I add user access. I don't want to give full rw access to the world. So I created a simple .htpasswd file for basic authentication. However, it's when I turn it on that I run into a strange problem.
I get an error saying: error: Unable to find c4e59b4653a5a16a36f95334fc686b15a8784d9a under http://10.0.0.57/project Cannot obtain needed commit c4e59b4653a5a16a36f95334fc686b15a8784d9a while processing commit 4ea5eeac305b91e3b0f82f3cd4cd677179f6da89. error: Fetch failed.
The thing is, that first hash refers to the previous to last commit. The only record of it I can see is in logs/refs/remotes/git-svn
I have tried this using Tortoisegit and Cygwin (command line with git installed). Tortoisegit give me an error. Cygwin gives me a username prompt, but doesn't actually take the username. It's all very confusing, and I hope someone here has an answer for me. Below is a snippit of my Apache config.
<VirtualHost *:80>
DocumentRoot /srv/gitosis/repositories/ Alias /project1 "/srv/gitosis/repositories/project1/.git/" <Directory /srv/gitosis/repositories >
DAV filesystem
Options Indexes MultiViews +ExecCGI -Includes Order allow,deny Allow from all AuthType Basic AuthName "My git Repository" AuthUserFile /srv/gitosis/dav_git.passwd Require valid-user </Directory> ServerName <removed for my protection> SetEnv GIT_PROJECT_ROOT /srv/gitosis/repositories SetEnv GIT_HTTP_EXPORT_ALL SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER ScriptAlias /srv/gitosis/repositories/ /usr/lib/git-core/git-http-backend/
</VirtualHost>
I double checked to make sure I have all apache modules loaded. So that shouldn't be the problem... I wouldn't think anyways.
Any advice would be greatly appreciated. Thank you.
SOLVED! See my comment!
[link] [8 comments]