* bare init and gitweb
@ 2008-06-17 17:43 Martin Röhricht
2008-06-17 20:27 ` Jakub Narebski
0 siblings, 1 reply; 3+ messages in thread
From: Martin Röhricht @ 2008-06-17 17:43 UTC (permalink / raw)
To: git
Hi,
in order to use git for some projects via WebDAV I followed the
instructions given in
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
So what I basically did is to create a bare repository on the server:
-------------------------8<------------------------
$ mkdir ~/gitrepo.git
$ cd gitrepo.git
$ git --bare init
$ sudo chown -R www-data:www-data .
-------------------------8<------------------------
On the client's side I set up a (local) repository and push changes to
the server:
-------------------------8<------------------------
$ mkdir git-test
$ cd git-test
$ git init
$ touch README
$ git add .
$ git commit -m "Initial commit"
$ git-config remote.upload.url http://user@server/gitrepo/
$ git push upload master
Fetching remote heads...
refs/
refs/heads/
refs/tags/
updating 'refs/heads/master'
from 0000000000000000000000000000000000000000
to a0bb58fcd20c31d5575dbd6bdab55c9b28970429
sending 3 objects
done
-------------------------8<------------------------
Whenever I clone the server's repository somewhere else, I get the
README file as expected. But when I use gitweb to show me the contents
of the repository, all I get is this:
-------------------------8<------------------------
projects /
403 Forbidden - No projects found
-------------------------8<------------------------
The projectroot variable within /etc/gitweb.conf points to my
~/gitrepo.git, and whenever I use "git init", add and commit some files
locally on the server I see the contents as expected by using gitweb,
but never by using a repository created with "git --bare init".
Can someone help me out? I would really appreciate any help.
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bare init and gitweb
2008-06-17 17:43 bare init and gitweb Martin Röhricht
@ 2008-06-17 20:27 ` Jakub Narebski
2008-06-18 6:14 ` Martin Röhricht
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Narebski @ 2008-06-17 20:27 UTC (permalink / raw)
To: Martin Röhricht; +Cc: git
Martin Röhricht <public@felicis.org> writes:
> in order to use git for some projects via WebDAV I followed the
> instructions given in
> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
[...]
> Whenever I clone the server's repository somewhere else, I get the
> README file as expected. But when I use gitweb to show me the contents
> of the repository, all I get is this:
>
> -------------------------8<------------------------
> projects /
>
> 403 Forbidden - No projects found
> -------------------------8<------------------------
>
> The projectroot variable within /etc/gitweb.conf points to my
> ~/gitrepo.git, and whenever I use "git init", add and commit some
> files locally on the server I see the contents as expected by using
> gitweb, but never by using a repository created with "git --bare init".
>
> Can someone help me out? I would really appreciate any help.
The $projectroot variable should point to the _common root_ of all
projects, in your case it could be one directory up your repository,
for example
our $projectroot = /home/nick
not
our $projectroot = /home/nick/gitrepo.git
(and '~' expansion would not work).
gitweb/README and gitweb/INSTALL should explain it in more detail.
The documentation you mentioned IIUC is for people who know how to
setup gitweb already
http://repo.or.cz/w/git.git?a=blob;f=gitweb/INSTALL;hb=HEAD
http://repo.or.cz/w/git.git?a=blob;f=gitweb/README;hb=HEAD
--
Jakub Narebski
Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bare init and gitweb
2008-06-17 20:27 ` Jakub Narebski
@ 2008-06-18 6:14 ` Martin Röhricht
0 siblings, 0 replies; 3+ messages in thread
From: Martin Röhricht @ 2008-06-18 6:14 UTC (permalink / raw)
To: git; +Cc: git
Hi Jakub,
On 06/17/2008 10:27 PM, Jakub Narebski wrote:
> Martin Röhricht <public@felicis.org> writes:
>
>> in order to use git for some projects via WebDAV I followed the
>> instructions given in
>> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt
>
> [...]
>> Whenever I clone the server's repository somewhere else, I get the
>> README file as expected. But when I use gitweb to show me the contents
>> of the repository, all I get is this:
>>
>> -------------------------8<------------------------
>> projects /
>>
>> 403 Forbidden - No projects found
>> -------------------------8<------------------------
>>
>> The projectroot variable within /etc/gitweb.conf points to my
>> ~/gitrepo.git, and whenever I use "git init", add and commit some
>> files locally on the server I see the contents as expected by using
>> gitweb, but never by using a repository created with "git --bare init".
>>
>> Can someone help me out? I would really appreciate any help.
>
> The $projectroot variable should point to the _common root_ of all
> projects, in your case it could be one directory up your repository,
> for example
>
> our $projectroot = /home/nick
>
> not
>
> our $projectroot = /home/nick/gitrepo.git
thank you very much -- you solved my problem and it works like a charm. :-)
Have a nice day,
Martin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-18 6:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-17 17:43 bare init and gitweb Martin Röhricht
2008-06-17 20:27 ` Jakub Narebski
2008-06-18 6:14 ` Martin Röhricht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).