Quoting SyF <
julien.b...@gmail.com>:
> Dears,
hi,
> I've been looking for information all over the web to configure a multiple
> project git repository with gitolite, gitweb (read/write restriction based
> on gitolite conf and ldap user), apache and ldap authentication on a CentOS
> 6.2, but after hours trying to set it up, I just decided to send a mail
> here as that's what I've been told on IRC...
well, that's basically what we have runnning here. we're hosting the
repositories on solaris, that shouldn't make a difference though.
> So the last state of my installation is as below:
>
> - I created git:apache user with its home set to /home/git which
> contains:
>
> /home/git/.gitolite.rc *only contains 2 lines: $REPO_UMASK =
> 0022;$GL_GITCONFIG_KEYS = "gitweb.url receive.denyNonFastforwards
> receive.denyDeletes";*
> /home/git/gitolite *gitolite srcs*
> /home/git/repositories/testing.git *gitolite auto-generated testing repo*
> /home/git/repositories/gitolite-admin.git *gitolite auto-generated admin
> repo*
that looks reasonable, but the gitolite.rc doesn't seem to be correct.
which version of gitolte are you running? this doesn't look like v3
syntax.
> - gitweb installed using yum:
>
> /var/www/git/gitweb.cgi
> /etc/gitweb.conf: *basic configuration and I modified this:*
yes, you have to if you want to integrate gitweb with gitolite. again
the question is which version of gitolite you're using, because the
syntax varies.
> - git-daemon installed using yum
you don't need git daemon, unless you want to serve repositories via
the native git protocol.
> - httpd (all apache necessary modules are loaded) git.conf at
> /etc/httpd/conf.d/git.conf:
[...]
well, i use a different approach, because i don't like this overly
complex ScriptAlias match ;-)
i use suexec to run gitweb and gitolite, because my apache uses a
different user than the one git's running at.
my apache's documentroot is gitweb, and /git/ is matched to a wrapper,
which calls gitolite (some of it is documented in
http://sitaramc.github.com/gitolite/ssh-and-http.html):
<VirtualHost *:443>
DocumentRoot /var/www/htdocs/gitweb
<Directory /var/www/htdocs/gitweb>
Options ExecCGI
AllowOverride none
Order allow,deny
Allow from all
</Directory>
DirectoryIndex gitweb.cgi
SuexecUserGroup git git
ScriptAlias /git/ /var/www/htdocs/bin/
gitolite-suexec-wrapper.sh/
<Location />
AuthType Basic
AuthName "Git Access"
AuthBasicProvider ldap
AuthLDAPURL "ldaps://..."
Require valid-user
</Location>
</VirtualHost>
> - giteweb is displayed at
http://localhost/git/ but pictures/styles are
> not loaded and it doesn't ask for ldap authentication
check apache's error log, probably gitweb is searching in the wrong
directories. you can define the location of these files via your
gitweb.conf as well.
and apache is not requesting authentication because of "Satisfy Any".
if the user passed host based authentication (i assume allow from
all), the ldap based authentication is no longer required.
> - I don't think gitolite is used at the moment, so I'm wondering what I
> should add and where
definitely not, no. you have to use the export_auth_hook. i can help
you there, if you're using gitolite v3 ;-)
> Any help would be very appreciated as I don't really know what to do
> here....
well, i hope i was able to highlight some issues :-)
i walked your path once and everything is up and running now.
-
https://repo/ asks for authentication and runs gitweb. it only
displays the repositories the user has access to (as defined by
gitolite)
-
https://repo/git/... is used for pulling/pushing via "git
clone|pull|push
https://repo/git/...". apache is authenticating the
user via our LDAP directory, and gitolite decides whether access is
granted or not.
hth,
tom.
--
Thomas "Duke" Hager
du...@sigsegv.at
GPG: 2048R/791C5EB1
http://www.sigsegv.at/gpg/duke.gpg
=================================================================
"Never Underestimate the Power of Stupid People in Large Groups."