views:

1893

answers:

4

running git instaweb in my repository opens a page that says "403 Forbidden - No projects found". What am I missing?

A: 

I don't know Git about Git, but you're probably missing the ability to execute on the directory in question, chmod +X it.

Peter Turner
I tried it just to be sure, but it doesn't appear to be correct in this case: `git instaweb` runs `lighttpd` as the active user. I definitely have full permissions to the repository.
jes5199
Well, I have a similar issue on my websitehttps://www.american-data.com/pub works okand http://www.american-data.com/pub gives the 403 ErrorI was getting that for a few reasons, problems following symlinks, and .htaccess files and problems with httpd.conf to name a few.
Peter Turner
+14  A: 

looks like the debian install of git sets $projectroot globally in a way that confuses instaweb. I removed the $projectroot line from /etc/gitweb.conf and the error went away.

jes5199
@jes5199's fix also works with Ubuntu (9.04), I guess because debian is upstream.
Matt Curtis
+1: Thanks for this. It just helped me out :-)
Johnsyweb
+1  A: 

check the git-web cgi (the perl), see the directory of the projectroot is same as your currect setting. there are some settings that not in gitweb.conf

+1  A: 

Two years later ..

I fixed this problem by stating the projectroot in gitweb.cgi (it's the only value that seems to matter)

klang