0

I wouldn't be posting here unless I've run out of options. Be forewarned, I could be making a very simple rookie mistake.

I'm trying to set up the git-http-backend on Ubuntu Server 12.04. I've gone through all the tutorials and configurations I've found on Kernel.org, the various Ubuntu sites, git-scm, Serverfault, etc. But no matter what I do, my Apache error log shows that it is looking for my git repos in /var/www when my virtual host directive is set to /home/git/repos.

I've been trying to clone the repo on my Ubuntu server box to my Windows 8 machine via http. In the Windows GUI I input http://git@server.home.lan/git/project3.git into the clone dialog but the client (and git bash) return the following error.

fatal: http://git@server.home.lan/git/project3.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

at the same time, the Apache error log delivers the following:

[Sun Feb 03 20:12:08 2013] [error] [client 192.168.1.135] File does not exist: /var/www/git

My Apache virtualhost for the Git http backend is configured as follows. I have tried many, many variations of this but I have always gotten the same error.

This configuration is located in /etc/apache2/sites-available/git

<VirtualHost *:80>
SetEnv GIT_PROJECT_ROOT /home/git/repos
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git/ /usr/bin/git-http-backend/

ServerName server.home.lan

DocumentRoot "/home/git/repos"

<Directory "/home/git/repos">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>

<Location />
AuthType Basic
AuthName "Git"
Require group committers
</Location>

</VirtualHost>

What am I doing wrong?

  • are you sure you have the right permissions on the folders git should enter? – Harrys Kavan Feb 4 '13 at 8:17
  • I believe so. I added the git user to the www-data group and set the folder's owner to www-data:www-data. – Chad Feb 4 '13 at 20:20
  • do a grep through your apache conf to find out if /var/www/git is referenced anywhere. Alternatively, do you have another virtual host entry which functions as the default which is getting hit instead? – drone.ah Feb 15 '13 at 19:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.