On Thu, 10 Apr 2014 02:15:11 -0700 (PDT)
Matthew Pintor <matthewpintor2...@gmail.com> wrote:

[...]
> I disabled the selinux. create git.conf in /etc/httpd/conf.d and a 
> /var/www/gitrepo for different repositories.
> 
> the content of git.conf is
> SetEnv GIT_PROJECT_ROOT /var/www/gitrepo
> <Directory "/var/www/gitrepo">
>     Options Indexes FollowSymlinks ExecCGI
>     Allow From All
>     Dav On
> </Directory>

You don't need "Dav On" to use Git: it doesn't know about Webdav and
makes not use of it.

> ScriptAliasMatch \
> "(?x)^/git/(.*/(HEAD | \
> info/refs | \
> objects/(info/[^/]+ | \
> [0-9a-f]{2}/[0-9a-f]{38} | \
> pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
> git-(upload|receive)-pack))$" \
> /usr/libexec/git-core/git-http-backend/$1
> ScriptAlias /git /usr/libexec/git-core/git-http-backend
> <Location /git>
>     Dav on

Same as above.

>     AuthType Basic
>     AuthName "Git Repositories"
>     AuthUserFile /etc/.htpasswd
>     Require valid-user
> </Location>
> 
> i kept on receiving errors like:
> 
> fatal: GIT_PROJECT_ROOT is set but PATH_INFO is not

That's interesting.
By googling I was able to dig up [1] which might be of interest to you.
Try playing with this option.

One more note: why are you using "/git" as your ScriptAlias, and not
"/git/"?  The official documentation [2] uses the latter form.
I'm not sure this matters but I think it worth playing with anyway.

> when i assign value to PATH_INFO with $SCRIPT_URL, i keep getting:
> 
> fatal: '$SCRIPT_URL=': aliased

PATH_INFO env. variable is defined in the CGI spec and is supposed to
be cooked up by the web server; you're not supposed to mess with it.

> What is suppost to be the owner of the .htpasswd and .htgroup file
> and even the repository folder? is it the apache user or the git user?

The account under which the Apache is running must have r/w permissions
on the Git repos it accesses.  A typical setup for this is to make the
Git repos owned by group "git" or "devel" and add the Apache's user to
that group.  Of course, the repos should have rwx permissions for that group, 
recursively.  So supposedly you should create them using the "--share=group"
command-line option passed to `git init`.

1. http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo 
2. https://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to