Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

All -

I'm getting a 404 - No projects found trying to get a gitweb server up. Git and gitolite work fine, but I can't get projects to show up. Here's my setup:

I'm working on getting Gitweb up on a Fedora 19 (x64 in case it matters) VM. I've got the following users created:

root (obviously)

git (for gitolite)

cbarton (gitolite administrator, creator of .ssh. keys that are being loaded into gitolite - yes, Clint Barton - I'm using Marvel character names to distinguish the different users from each other to make following who has what rights easier for me)

rrichards - git user (yes, Reed Richards)

hpym - git user (again, yes, Hank Pym)

I also specifically did NOT add any of these users to the sudoers file so I would have to be root each time. Again, I did this so I knew for sure who I was logged in as at any given time.

Here is what I have done to date:

Installed the OS

Connected via putty confirming SSH is working

Installed Apache (httpd)

Modified firewalld to allow http access and confirmed it is working

Logged in as cbarton

Created ssh keys for gitadmin, rrichards, hpym, cbarton

Installed git

Installed all updates

Created git user

Copied gitadmin.pub from /home/cbarton/.ssh to /home/git using scp (changed ownership from cbarton to git)

Logged in as git user

Got gitolite onto the system: git clone git://github.com/sitaramc/gitolite

Created /home/git/bin directory

gitolite/install -ln

./bin/gitolite setup -pk gitadmin.pub

Logged in as cbarton

Modified config file under .ssh (chmod 700 on .ssh, chmod 600 on config file)

Contents of cbarton config:

host gitserver-gitadmin
    user git
    hostname (dns name)
    IdentityFile ~/.ssh/gitadmin

host gitserver-cbarton
    user git
    hostname (dns name)
    IdentityFile ~/.ssh/cbarton

mkdir /home/cbarton/repos

cd /home/cbarton/repos

git clone git@gitserver-gitadmin:gitolite-admin

Added cbarton.pub, rrichards.pub, hpym.pub into keydir and added into git using git add

Addeed cbarton, rrichards, hpym into conf/gitolite.conf and gave them RW+ access to some empty repos that I created

git commit

git push

Empty repos that I created were added

secure copied (scp) rrichards, hpym files into their respective home directories

Logged in as rrichards

Created /home/rrichards/.ssh directory

Modified config file under .ssh (chmod 700 on .ssh, chmod 600 on config file)

Contents of rrichards config:

host gitserver-rrichards
    user git
    hostname (dns name)
    IdentityFile ~/.ssh/rrichards

mkdir /home/rrichards/repos

cd /home/rrichards/repos

git clone git@gitserver-rrichards:CWBRepo

Repo copied, but told me it was an empty repo, which is fine.

Logged in as hpym

Created /home/hpym/.ssh directory

Modified config file under .ssh (chmod 700 on .ssh, chmod 600 on config file)

Contents of hpym config:

host gitserver-hpym
    user git
    hostname (dns name)
    IdentityFile ~/.ssh/hpym

mkdir /home/rrichards/repos

cd /home/rrichards/repos

git clone git@gitserver-rrichards:CWBRepo

Repo copied, but told me it was an empty repo, which is fine.

After I verified that all of the git stuff was working, I installed gitweb

Logged in as root

yum install gitweb

It is at this point where I was working with a number of different articles trying to piece together what I needed to do to get this working.

I modified /etc/gitweb.conf:

$projectroom = "/home/git/repositories";
$projects_list = "/home/git/projects.list";
$home_link_str = "My Project List Title - GitWeb Server";
$site_name = "My Site Name - GitWeb Server";

I added the home_link_str and site_name just to make sure the /etc/gitweb.conf was being read once I restarted Apache. You could say I used these variables as debugging tools.

I modified /etc/httpd/conf.d/git.conf

Alias /git /var/www/git

<Directory /var/www/git>
  Options +ExecCGI
  AddHandler cgi-script .cgi
  DirectoryIndex gitweb.cgi

  SetEnv  GITWEB_CONFIG  /etc/gitweb.conf

</Directory>

At this point, going to (dns name)/git, I get a web page response, but where there should be a list of repos, I get '404 - No projects found'.

I went into /var/www/git/gitweb.cgi and looked for 'No projects found' and found three occurances of it. I put a 1, 2, and a 3 after each of the three occurances so I could determine which one was throwing the 404 error and it turns out that it is the first one.

Now I'm in over my head. I don't know perl, so am having a hard time reading into the code (gitweb.cgi) to understand what is going on.

I've been told that the problem I could be running into is permission-based. I've added the 'apache' user to the group 'git' and the 'git' user to the group 'apache' with no noticable difference. I've also done a 'chmod -R 755 /home/git/repositories' but also no luck - I still get the 404 message.

/var/www/git and all components are owned by root.root. I've tried changing those to git.git and apache.apache and restarting the httpd service each time, but no difference.

A few articles have recommended to me that I need to create a gitolite-suexec-wrapper.sh file in /var/www/bin and I've tried that as well. I think that's more for a component of gitolite so I don't see the applcation here, but I could be wrong.

Anyone have any suggestions/ideas? I'll take any help I can get!!

Thanks in advance!!!

share|improve this question
    
Your problem is actually with Gitweb, right? Can you make your question more concise? At the very least, put your actual question first and follow it with the other details of how you set your server up. –  Mark Johnson Sep 18 '13 at 18:45
    
Question moved to the top. –  Charles Buege Sep 19 '13 at 13:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.