# gitweb doesn't work with bare repositories

5 messages from 2008-11-29 to 2008-11-30. Participants: Evgeniy Ivanov, Fredrik Skolmli, J.H., Jakub Narebski.
Thread: https://gitlist.dev/t/16523

## Evgeniy Ivanov, 2008-11-29 23:37

Subject: gitweb doesn't work with bare repositories
Message-ID: <4931D23A.10402@gmail.com>
URL: https://gitlist.dev/e/4931D23A.10402%40gmail.com

```
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, 2008-11-30 00:01

Subject: Re: gitweb doesn't work with bare repositories
Message-ID: <20081130000115.GB20403@frsk.net>
URL: https://gitlist.dev/e/20081130000115.GB20403%40frsk.net
In-Reply-To: <4931D23A.10402@gmail.com>

```
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., 2008-11-30 00:24

Subject: Re: gitweb doesn't work with bare repositories
Message-ID: <4931DD20.6020603@eaglescrag.net>
URL: https://gitlist.dev/e/4931DD20.6020603%40eaglescrag.net
In-Reply-To: <20081130000115.GB20403@frsk.net>

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

- John 'Warthog9' Hawley
Chief Kernel.org Administrator

Fredrik Skolmli wrote:
> 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, 2008-11-30 00:25

Subject: Re: gitweb doesn't work with bare repositories
Message-ID: <m3bpvyjc0r.fsf@localhost.localdomain>
URL: https://gitlist.dev/e/m3bpvyjc0r.fsf%40localhost.localdomain
In-Reply-To: <4931D23A.10402@gmail.com>

```
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.

> 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, 2008-11-30 14:52

Subject: Re: gitweb doesn't work with bare repositories
Message-ID: <4932A8BE.9080302@gmail.com>
URL: https://gitlist.dev/e/4932A8BE.9080302%40gmail.com
In-Reply-To: <4931D23A.10402@gmail.com>

```
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:
> 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

```
