I have successfully set up gitweb on an apache vHost accessable for all authenticated users.
The server itself provides several git repositories via https and has per user/group access to those projects. For example test1.git is only readable/writable by group test1 and test2.git is only readable/writable by group test2.
Now I also want only those groups to see their corresponding git repositories in the gitweb interface. Is it possible to have those granular access rights for gitweb?
If not, is there a light-weight web gui for git, that can handle basic http authentication per project (and possibly ldap authentication for later)?
Edit Just to make things clearer (as there seems some confusion from the comments): Example:
There are 10 repositories (test1, test2, ... test10)
user lockdoc is in group test1 and test3
Once authenticated over http with username lockdoc and his/her password, this user can only see git projects test1 and test3 and cannot browse/see any other projects
No need for writing (pushing) over the webinterface, as this is already implemented
No GUI, but I would recommend using gitolite for this kind of fine-grained authorization.
See this httpd.conf for LDAP and gitolite access:
The https config would look like this:
ScriptAlias /hgit/ @H@/sbin/gitolite-shell/
SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"
<Location /hgit>
...
</Location>
In both case, you can protect those http addresses with LDAP-based authentication:
AuthName "LDAP authentication for ITSVC Smart HTTP Git repositories"
AuthType Basic
AuthBasicProvider myldap companyldap
AuthzLDAPAuthoritative Off
Require valid-user
And you will register your users/groups/repos in the gitolite.conf
configuration file associated with gitolite.
@lockdoc_repos = test1 test3 # group of repo
repo @lockdoc_repos
R = lockdoc # read-only access for lockdoc
R = gitweb daemon # can be browsed
See "testing/info/refs not found in gitolite after removing R @all rule" for more on how to allow browsing for a repo, by sitaram (Sitaram Chamarty), creator of gitolite himself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With