GIT server over HTTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm trying to migrate from SVN to GIT and are facing some problems with setting up public GIT repository accessible via HTTP for pull and push. I'm runnig 2.6.26 kernel on Gentoo Linux with apache 2 and git 1.5.6.4. Following the http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt I managed to get following done:

1. create GIT repo in /home/hinkok/public_html:
$ mkdir ~/public_html/gitrepo.git
$ cd ~/public_html/gitrepo.git
$ git --bare init
$ sudo chown -R apache:apache .

2. Create DAV entry for apache web server
$ cat /etc/apache2/modules.d/48_mod_dav_git.conf 
<Location /~hinkok/gitrepo.git>
	DAV on
#	AuthType None
	AuthType Basic
	AuthName "Git"
	AuthUserFile /home/hinkok/passwd.git
	Require valid-user
</Location>

$ htpasswd -c ~/passwd.git hinkok
$ cat ~/passwd.git
hinkok:t9871siBkRbaU
$ cat ~/.netrc 
machine localhost
login hinkok
password hinkok

3. Test GIT location
$ curl --netrc --location http://hinkok@localhost/~hinkok/gitrepo.git/HEAD
ref: refs/heads/master

Firefox also requests user auth for http://hinkok@localhost/~hinkok/gitrepo.git

4. Pushing some changes to the remote repo
$ cd /tmp
$ mkdir gt
$ cd gt/
$ git init
$ git-config remote.upload.url http://hinkok@localhost/~hinkok/gitrepo.git/    
$ git push upload master
error: Cannot access URL http://hinkok@localhost/~hinkok/gitrepo.git/, return code 22
error: failed to push some refs to 'http://hinkok@localhost/~hinkok/gitrepo.git/'

$ cat .git/config
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "upload"]
	url = http://hinkok@localhost/~hinkok/gitrepo.git/

 $ sudo tail /var/log/apache2/error_log
[Fri Sep 19 15:29:20 2008] [notice] Apache/2.2.9 (Unix) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8g SVN/1.5.1 PHP/5.2.6-pl6-gentoo configured -- resuming normal operations
[Fri Sep 19 15:31:03 2008] [error] [client 127.0.0.1] client denied by server configuration: /home/hinkok/public_html/gitrepo.git/

What am I missing here?

Thank you,
Hinko

-- 
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar@xxxxxxxxxxxx
Http: www.cetrtapot.si

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux