threads / discuss / 16523

gitweb doesn't work with bare repositories

Subject: gitweb doesn't work with bare repositories

## tl;dr

5 messages between Nov 29, 2008 and Nov 30, 2008.

replies: 4people: 4as markdown or json

Evgeniy Ivanov· Nov 29, 2008, 23:37 UTC · lore

Hi, I have installed gitweb and can't make it work with bare repos. I have such config: $my_uri = "http://mysite.org:8000"; $projectroot = "/srv/www/gamekeeper/htdocs/projects";

In projects I have created bare repo: mkdir some cd some.git git --bare init cd /some_git_repo git push /srv/www/gamekeeper/htdocs/projects master

Everything fine, but when I click the link on some.git I don't have a page (just "Error 404").

But if I clone /some_git_repo with some in the projects, I have a link "some/.git" and it works fine.

Permissions are ok, virtual host is ok since I get main page and have access to cloned repo.

What can be wrong?
-- 
Cheers, Evgeniy.
Key fingerprint: F316 B5A1 F6D2 054F CD18 B74A 9540 0ABB 1FE5 67A3
Fredrik Skolmli· Nov 30, 2008, 00:01 UTC · re: Evgeniy Ivanov · lore

Re: gitweb doesn't work with bare repositories

On Sun, Nov 30, 2008 at 02:37:30AM +0300, Evgeniy Ivanov wrote:
> Hi,
Hi.
Just checking now, but are the following corrections right?
> In projects I have created bare repo:
> mkdir some
mkdir some.git
> cd some.git
> git --bare init
> cd /some_git_repo
> git push /srv/www/gamekeeper/htdocs/projects master
git push /srv/www/gamekeeper/htdocs/projects/some.git master
> Permissions are ok, virtual host is ok since I get main page and have
> access to cloned repo.

You're sure the user the webserver is running as has access to the repo as well?

- Fredrik
-- 
Kind regards,
Fredrik Skolmli
J.H.· Nov 30, 2008, 00:24 UTC · re: Fredrik Skolmli · lore

Re: gitweb doesn't work with bare repositories

As a note kernel.org uses, predominantly, bare repositories and it works fine there....

- John 'Warthog9' Hawley
Chief Kernel.org Administrator
Fredrik Skolmli wrote:
Show 36 quoted lines
> On Sun, Nov 30, 2008 at 02:37:30AM +0300, Evgeniy Ivanov wrote:
>   
>> Hi,
>>     
>
> Hi.
>
> Just checking now, but are the following corrections right?
>
>   
>> In projects I have created bare repo:
>> mkdir some
>>     
>
> mkdir some.git
>
>   
>> cd some.git
>> git --bare init
>> cd /some_git_repo
>> git push /srv/www/gamekeeper/htdocs/projects master
>>     
>
> git push /srv/www/gamekeeper/htdocs/projects/some.git master
>
>   
>> Permissions are ok, virtual host is ok since I get main page and have
>> access to cloned repo.
>>     
>
> You're sure the user the webserver is running as has access to the repo as
> well?
>
> - Fredrik
>
>   
Jakub Narebski· Nov 30, 2008, 00:25 UTC · re: Evgeniy Ivanov · lore

Re: gitweb doesn't work with bare repositories

Evgeniy Ivanov <lolkaantimat@gmail.com> writes:
> I have installed gitweb and can't make it work with bare repos.

Actually gitweb treats all repositories as bare repositories, and doesn't touch at all neither index nor working area.

Show 5 quoted lines
> I have such config:
> $my_uri = "http://mysite.org:8000";
> $projectroot = "/srv/www/gamekeeper/htdocs/projects";
> 
> In projects I have created bare repo:
I assume that you have done:
$ cd /srv/www/gamekeeper/htdocs/projects
> $ mkdir some
I assume that you meant here
$ mkdir some.git
> $ cd some.git
> $ git --bare init
> $ cd /some_git_repo
> $ git push /srv/www/gamekeeper/htdocs/projects master
I assume that you meant:
$ git push /srv/www/gamekeeper/htdocs/projects/some.git master
> 
> Everything fine, but when I click the link on some.git I don't have a
> page (just "Error 404").
What error? Please provide _exact_ error message.

Does the problem persists with the following corrections? Do you have permissions set up correctly? How did you generate gitweb.cgi?

SAA#1 (Standard admin answer #1): WORKSFORME.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Evgeniy Ivanov· Nov 30, 2008, 14:52 UTC · re: Evgeniy Ivanov · lore

Re: gitweb doesn't work with bare repositories

Thanks to everybody for answers. I'm not subscribed and saw them in the list archive. All things you have noticed are typos, sure I typed commands correctly. The problem was caused by "$feature{'pathinfo'}{'default'} = [1];" in the config. So the problem is solved now. Good luck :)

Evgeniy Ivanov wrote:
Show 25 quoted lines
> Hi,
> I have installed gitweb and can't make it work with bare repos.
> I have such config:
> $my_uri = "http://mysite.org:8000";
> $projectroot = "/srv/www/gamekeeper/htdocs/projects";
> 
> In projects I have created bare repo:
> mkdir some
> cd some.git
> git --bare init
> cd /some_git_repo
> git push /srv/www/gamekeeper/htdocs/projects master
> 
> Everything fine, but when I click the link on some.git I don't have a
> page (just "Error 404").
> 
> But if I clone /some_git_repo with some in the projects, I have a link
> "some/.git" and it works fine.
> 
> Permissions are ok, virtual host is ok since I get main page and have
> access to cloned repo.
> 
> What can be wrong?
> 
> 
-- 
Cheers, Evgeniy.
Key fingerprint: F316 B5A1 F6D2 054F CD18 B74A 9540 0ABB 1FE5 67A3

← back to recent threads