3

Goal: To see my project in the gitweb webpage.

I have git+gitolite+gitweb installed. My gitolite.conf file is:

repo    gitolite-admin
        RW+     =   ADMINUSER

repo    testing
        RW+     =   @all

repo    PROJECT1
        RW+     =   USER1
        RW+     =   USER2
        R       =   gitweb

When I go to my server's http://server/gitweb/gitweb.cgi but the only projects that I can see are:

  • testing.git

On the server running gitolite. The /home/git/projects.list file has:

PROJECT1.git

How do I get PROJECT1 to show up when I go to the gitweb URL?

Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177

3 Answers3

2

Make sure your gitweb.conf has follow lines.

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

change that path to yours. I had same problem because I dont have the second line. So my repo show randomly on web.

HVNSweeting
  • 2,859
  • 2
  • 35
  • 30
1

You normally only need to give read access to gitweb: see specifying gitweb and daemon access

To make a repo or repo group accessible via "git daemon", just give read permission to the special user "daemon".
Similarly, give read permission to gitweb to allow the gitweb CGI to show the repo.
Something like this:

repo    foo bar baz
    R   =   gitweb daemon

This gives you a quick way to offer multiple repos up for gitweb and/or daemon access.

You can also simply add a description to your project to make it visible:

repo    PROJECT1
        PROJECT1 = "description for PROJECT1"
        RW+     =   USER1
        RW+     =   USER2

For the rest, make sure your gitolite+gitweb+ssh+http-backend setup follows the documentation.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • In my gitolite configuration I do have `R = gitweb` already but gitweb doesn't show PROJECT1. Gitweb only shows PROJECT1 when I give PROJECT1 `R = @all`. – Trevor Boyd Smith Dec 22 '11 at 15:36
  • @TrevorBoydSmith `R = gitweb` isn't enough. Do you also have `RW+ = USER1`? (ie another rule for other users) – VonC Dec 22 '11 at 16:39
  • In my gitolite.conf for PROJECT1 I do have `RW+ = USER1`. – Trevor Boyd Smith Dec 22 '11 at 18:51
  • Given that I have `R = gitweb` but gitweb doesn't show PROJECT1, doesn't that mean my http/apache is not configured properly? – Trevor Boyd Smith Dec 22 '11 at 18:53
  • @TrevorBoydSmith: I suspect so. Time to double-check http://sitaramc.github.com/gitolite/ggshb.html. If somehow the identification for USER1 isn't properly passed to Gitolite, gitweb won't display the site. – VonC Dec 22 '11 at 18:59
  • I will look into the ggshb.html website link you gave. But I am confused what does the USER1 have to do with my gitweb configuration? – Trevor Boyd Smith Dec 22 '11 at 19:54
  • @TrevorBoydSmith because the `R = gitweb` is only there to list all projects that gitweb can *potentially* display. But it won't display the ones where you ('USER1') have no 'R' rights. – VonC Dec 22 '11 at 21:15
0

I had the same problem, and it turned out to be a group ownership issue. From previously using ssh access, I had the group ownership of the repos set to an internal developer group rather than git. Once I ran:

chown -R git:git /home/git/repositories

All repos showed up with the conf file using:

$projects_list = $projectroot;
Bruce Edge
  • 1,975
  • 1
  • 23
  • 31