gitweb shows 404 - No projects found error

1,870 views
Skip to first unread message

Maneesh M P

unread,
Feb 6, 2014, 2:33:48 PM2/6/14
to gito...@googlegroups.com
I have installed and configured gitweb to work with gitolite, but i am getting the error 404 - No Projects found error,

My gitolite configurations are given below

$ ls gitolite-admin/conf
gitolite.conf vampire devil

$cat gitolite.conf
include "vampire/vampire.conf"
include "devil/devil.conf"
@admin = u...@abc.com
repo gitolite-admin
RW+ = @admin

$ls vampire
vampire.conf

$ls devil
devil.conf

$ cat vampire.conf

@vampire-admin = a...@abc.com
@vampire-team = @vampire-admin x...@abc.com

repo vampire/[a-zA-Z0-9].*
C = @vampire-admin
RW+ = CREATOR
RW = @vampire-team

repo vampire/acceptance
RW = @vampire-team

repo dragon/build
RW = @vampire-team

In the server side,
repositories are located => /home/git/repositories

$ ls /home/git/repositories
gitolite-admin.git vampire devil
cd vampire
$ls
acceptance.git build.git

My projects.list file contains

$cat projects.list
vampire/acceptance.git
vampire/build.git
devil/build.git
devil/regression.git

I have also done the below gitweb configurations
updated /etc/gitweb.conf with below values

$projectroot = "/home/git/repositories";
$projects_list = "/home/git/projects.list";

also updated /usr/share/gitweb/index.cgi with below values

#our $projectroot = "/pub/scm";
our $projectroot = "/home/git/repositories";

# source of projects list
our $projects_list = "/home/git/projects.list";

Can anyone help me to find what is going wrong with my configuration?

Thanks in advance,
Maneesh

Sitaram Chamarty

unread,
Feb 6, 2014, 7:15:30 PM2/6/14
to Maneesh M P, gito...@googlegroups.com
On 02/07/2014 01:03 AM, Maneesh M P wrote:

> $cat gitolite.conf
> include "vampire/vampire.conf"
> include "devil/devil.conf"
> @admin = u...@abc.com
> repo gitolite-admin
> RW+ = @admin
>
> $ cat vampire.conf
>
> @vampire-admin = a...@abc.com
> @vampire-team = @vampire-admin x...@abc.com
>
> repo vampire/[a-zA-Z0-9].*
> C = @vampire-admin
> RW+ = CREATOR
> RW = @vampire-team
>
> repo vampire/acceptance
> RW = @vampire-team
>
> repo dragon/build
> RW = @vampire-team

[snip]

> My projects.list file contains
>
> $cat projects.list
> vampire/acceptance.git
> vampire/build.git
> devil/build.git
> devil/regression.git

1. you didn't post devil/devil.conf, but with what you have posted,
projects.list should be *empty*. I see no way that the special user
"gitweb" has any access at all.

2. regardless of that, gitolite's job stops at producing a correct
projects.list file. The rest is not a gitolite question, and I
don't really use gitweb so perhaps someone else will step in and
help you.

Maneesh M P

unread,
Feb 6, 2014, 7:30:41 PM2/6/14
to gito...@googlegroups.com, Maneesh M P
1. Here is the devil.conf file
#cat devil.conf

@devil-admin = h...@abc.com
@devil-team = @devil-admin l...@abc.com

repo devil/[a-zA-Z0-9].*
C = @devil-admin
RW+ = CREATOR
RW = @devil-team

repo devil/build
RW = @devil-team

repo devil/regression
RW = @devil-team

my gitolite.conf file has below line as well for gitweb permission.

$cat gitolite.conf

# special repo that applies rules to all repositories.
repo @all
R = gitweb
R = daemon


Also, the projects.list file got generated successfully.

$cat projects.list
vampire/acceptance.git
vampire/build.git
devil/build.git
devil/regression.git

Since I have sub directories[vampire, devil] inside repositories and .git repositories are inside the sub directories, would that make an issue? I am not sure.

Sami Hartikainen

unread,
Feb 7, 2014, 1:06:32 PM2/7/14
to gito...@googlegroups.com, Maneesh M P
Have you checked the web server access/error logs? Gitweb is likely to show 404 error if it cannot access the projects.list and/or repository directories.

Did you set the UMASK in .gitolite.rc? And is the web server user (typically www-data) allowed read-access to repo directories?

Maneesh M P

unread,
Feb 8, 2014, 2:54:26 AM2/8/14
to gito...@googlegroups.com, Maneesh M P
Thanks for the reply, I figured the out the issue. projets.list did not have enough permission. The permission was only 700 so gitweb was not able to read projects list.

Does this mean, if I set a repository permission to 755 and it my gitolite-admin conf file even if i specify the below line, still gitweb will be able to read and display the repository ?

- = gitweb # don't list in gitweb


Thanks,
Maneesh

Sitaram Chamarty

unread,
Feb 8, 2014, 8:10:38 PM2/8/14
to Maneesh M P, gito...@googlegroups.com
That's a deny rule. By default, deny rules do not affect read access;
see http://gitolite.com/gitolite/rules.html#deny-rules and the examples
linked from there for more.

Secondly, manually changing permissions won't work; next time someone
pushes, the new objects will again need to be chmod-ed. You need to
change the umask for your setup.

See http://gitolite.com/gitolite/external.html for a starting point.

dmytryk7

unread,
Mar 16, 2014, 8:47:22 AM3/16/14
to gito...@googlegroups.com, Maneesh M P

In my case, to make gitweb work with gitolite, I added "apache" user to "git" user group.
Changed U_MASK.
chmod all existing dirs
And added http://gitolite.com/gitolite/gitweb.conf.html code.
R= gitweb, repos I wanted to expose.
There are many articles about this, but I still spent a few days trying to make it work

Reply all
Reply to author
Forward
0 new messages