{"thread":{"id":"14005","subject":"bare init and gitweb","startedAt":"2008-06-17T17:43:37Z","lastAt":"2008-06-18T06:14:39Z","messageCount":3,"participants":["Martin Röhricht","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80158","messageId":"g38t49$lgr$3@ger.gmane.org","threadId":"14005","inReplyTo":null,"subject":"bare init and gitweb","fromName":"Martin Röhricht","fromEmail":"public@felicis.org","sentAt":"2008-06-17T17:43:37Z","receivedAt":"2008-06-17T17:43:37Z","isPatch":false,"sender":{"key":"public@felicis.org","avatar":null},"body":"Hi,\n\nin order to use git for some projects via WebDAV I followed the \ninstructions given in \nhttp://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n\nSo what I basically did is to create a bare repository on the server:\n\n-------------------------8<------------------------\n$ mkdir ~/gitrepo.git\n$ cd gitrepo.git\n$ git --bare init\n$ sudo chown -R www-data:www-data .\n-------------------------8<------------------------\n\nOn the client's side I set up a (local) repository and push changes to \nthe server:\n\n-------------------------8<------------------------\n$ mkdir git-test\n$ cd git-test\n$ git init\n$ touch README\n$ git add .\n$ git commit -m \"Initial commit\"\n$ git-config remote.upload.url http://user@server/gitrepo/\n$ git push upload master\nFetching remote heads...\n   refs/\n   refs/heads/\n   refs/tags/\nupdating 'refs/heads/master'\n   from 0000000000000000000000000000000000000000\n   to   a0bb58fcd20c31d5575dbd6bdab55c9b28970429\n     sending 3 objects\n     done\n-------------------------8<------------------------\n\nWhenever I clone the server's repository somewhere else, I get the \nREADME file as expected. But when I use gitweb to show me the contents \nof the repository, all I get is this:\n\n-------------------------8<------------------------\nprojects /\n\n403 Forbidden - No projects found\n-------------------------8<------------------------\n\nThe projectroot variable within /etc/gitweb.conf points to my \n~/gitrepo.git, and whenever I use \"git init\", add and commit some files \nlocally on the server I see the contents as expected by using gitweb, \nbut never by using a repository created with \"git --bare init\".\n\nCan someone help me out? I would really appreciate any help.\n\nMartin\n"},{"id":"80160","messageId":"m3bq1zolh6.fsf@localhost.localdomain","threadId":"14005","inReplyTo":"g38t49$lgr$3@ger.gmane.org","subject":"Re: bare init and gitweb","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-17T20:27:51Z","receivedAt":"2008-06-17T20:27:51Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Röhricht <public@felicis.org> writes:\n\n> in order to use git for some projects via WebDAV I followed the\n> instructions given in\n> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n\n[...]\n> Whenever I clone the server's repository somewhere else, I get the\n> README file as expected. But when I use gitweb to show me the contents\n> of the repository, all I get is this:\n> \n> -------------------------8<------------------------\n> projects /\n> \n> 403 Forbidden - No projects found\n> -------------------------8<------------------------\n> \n> The projectroot variable within /etc/gitweb.conf points to my\n> ~/gitrepo.git, and whenever I use \"git init\", add and commit some\n> files locally on the server I see the contents as expected by using\n> gitweb, but never by using a repository created with \"git --bare init\".\n> \n> Can someone help me out? I would really appreciate any help.\n\nThe $projectroot variable should point to the _common root_ of all\nprojects, in your case it could be one directory up your repository,\nfor example\n\n  our $projectroot = /home/nick\n\nnot\n\n  our $projectroot = /home/nick/gitrepo.git\n\n(and '~' expansion would not work).\n\ngitweb/README and gitweb/INSTALL should explain it in more detail.\nThe documentation you mentioned IIUC is for people who know how to\nsetup gitweb already\n  http://repo.or.cz/w/git.git?a=blob;f=gitweb/INSTALL;hb=HEAD\n  http://repo.or.cz/w/git.git?a=blob;f=gitweb/README;hb=HEAD\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"80204","messageId":"4858A7CF.5060005@felicis.org","threadId":"14005","inReplyTo":"m3bq1zolh6.fsf@localhost.localdomain","subject":"Re: bare init and gitweb","fromName":"Martin Röhricht","fromEmail":"public@felicis.org","sentAt":"2008-06-18T06:14:39Z","receivedAt":"2008-06-18T06:14:39Z","isPatch":false,"sender":{"key":"public@felicis.org","avatar":null},"body":"Hi Jakub,\n\nOn 06/17/2008 10:27 PM, Jakub Narebski wrote:\n> Martin Röhricht <public@felicis.org> writes:\n> \n>> in order to use git for some projects via WebDAV I followed the\n>> instructions given in\n>> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt\n> \n> [...]\n>> Whenever I clone the server's repository somewhere else, I get the\n>> README file as expected. But when I use gitweb to show me the contents\n>> of the repository, all I get is this:\n>> \n>> -------------------------8<------------------------\n>> projects /\n>> \n>> 403 Forbidden - No projects found\n>> -------------------------8<------------------------\n>> \n>> The projectroot variable within /etc/gitweb.conf points to my\n>> ~/gitrepo.git, and whenever I use \"git init\", add and commit some\n>> files locally on the server I see the contents as expected by using\n>> gitweb, but never by using a repository created with \"git --bare init\".\n>> \n>> Can someone help me out? I would really appreciate any help.\n> \n> The $projectroot variable should point to the _common root_ of all\n> projects, in your case it could be one directory up your repository,\n> for example\n> \n>   our $projectroot = /home/nick\n> \n> not\n> \n>   our $projectroot = /home/nick/gitrepo.git\n\nthank you very much -- you solved my problem and it works like a charm. :-)\n\nHave a nice day,\nMartin\n"}]}