From: Hinko Kocevar <hinko.kocevar@cetrtapot.si>
To: git@vger.kernel.org
Subject: GIT server over HTTP
Date: Fri, 19 Sep 2008 15:31:47 +0200 [thread overview]
Message-ID: <48D3A9C3.8080909@cetrtapot.si> (raw)
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@cetrtapot.si
Http: www.cetrtapot.si
reply other threads:[~2008-09-19 13:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48D3A9C3.8080909@cetrtapot.si \
--to=hinko.kocevar@cetrtapot.si \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox