{"thread":{"id":"43435","subject":"Re: Creating new repos","startedAt":"2006-10-27T12:29:10Z","lastAt":"2006-10-27T12:39:18Z","messageCount":2,"participants":["Petr Baudis","Horst H. von Brand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297663","messageId":"200610271229.k9RCTARu016773@laptop13.inf.utfsm.cl","threadId":"43435","inReplyTo":null,"subject":"Creating new repos","fromName":"Horst H. von Brand","fromEmail":"vonbrand@inf.utfsm.cl","sentAt":"2006-10-27T12:29:10Z","receivedAt":"2006-10-27T12:29:10Z","isPatch":false,"sender":{"key":"vonbrand@inf.utfsm.cl","avatar":"https://avatars.githubusercontent.com/u/211384?v=4"},"body":"I'm trying to set up git repos for remote access here. I set up git-daemon\nand got it working (some older repositories do work fine), but now:\n\n  $ mkdir /var/scm/user/SomeRepo.git\n  $ cd /var/scm/user/SomeRepo.git\n  $ git --bare init-db\n  $ touch git-daemon-export-ok\n\nAll OK, but then, from a remote machine:\n\n  $ git clone git://git-server/user/SomeRepo.git\n  fatal: no matching remote head\n  fetch-pack from 'git://git-server/user/Test.git' failed.\n\nThe empty repo created by init-db should be cloneable, so as to get the ball\nrolling easily.\n\nYou can't push into such an empty repository either.\n\nAny suggestion of how to set up a server into which users can create their\nown repos /without/ giving out full shell accounts?\n\nAlso, the behaviour of git-daemon is different when using git or ssh+git,\nyou need to give the full path for the later but not the former (given\n--base-path=/var/scm):\n\n  git://git-server/user/Test.git\n  ssh+git://git-server/var/scm/user/Test.git\n\nIs this intentional?\n-- \nDr. Horst H. von Brand                   User #22616 counter.li.org\nDepartamento de Informatica                    Fono: +56 32 2654431\nUniversidad Tecnica Federico Santa Maria             +56 32 2654239\nCasilla 110-V, Valparaiso, Chile               Fax:  +56 32 2797513\n"},{"id":"294769","messageId":"20061027123918.GB20017@pasky.or.cz","threadId":"43435","inReplyTo":"200610271229.k9RCTARu016773@laptop13.inf.utfsm.cl","subject":"Re: Creating new repos","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-10-27T12:39:18Z","receivedAt":"2006-10-27T12:39:18Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Oct 27, 2006 at 02:29:10PM CEST, I got a letter\nwhere \"Horst H. von Brand\" <vonbrand@inf.utfsm.cl> said that...\n> I'm trying to set up git repos for remote access here. I set up git-daemon\n> and got it working (some older repositories do work fine), but now:\n> \n>   $ mkdir /var/scm/user/SomeRepo.git\n>   $ cd /var/scm/user/SomeRepo.git\n>   $ git --bare init-db\n>   $ touch git-daemon-export-ok\n> \n> All OK, but then, from a remote machine:\n> \n>   $ git clone git://git-server/user/SomeRepo.git\n>   fatal: no matching remote head\n>   fetch-pack from 'git://git-server/user/Test.git' failed.\n> \n> The empty repo created by init-db should be cloneable, so as to get the ball\n> rolling easily.\n\nWell there's really nothing to clone, so it's tough. :-) What would such\na clone be supposed to do? It has no branches to record as belonging to\norigin, and note that Git's git-clone is long-term broken in the sense\nthat it won't pick new branches as they appear in the remote\nrepository. So a clone of an empty repository would be useless anyway.\n\n> You can't push into such an empty repository either.\n\nThis is supposed to work. What error do you get?\n\n> Any suggestion of how to set up a server into which users can create their\n> own repos /without/ giving out full shell accounts?\n\nSure:\n\n\thttp://repo.or.cz/w/repo.git\n\nBut it may be quite an overkill for you. ;-)\n\nIf you want them to be able to do it over ssh, you would need to provide\na trusted tool which would manage the repository setup, that means not\nonly doing init-db, but also managing the export-ok files, description\nfile, you'd likely want to enable the post-update hook (but probably not\nany other hook or let the user edit it since at that point you've given\nhim full shell access), etc. And the tool would have to be carefully\nreviewed since it's security-critical.\n\n> Also, the behaviour of git-daemon is different when using git or ssh+git,\n> you need to give the full path for the later but not the former (given\n> --base-path=/var/scm):\n> \n>   git://git-server/user/Test.git\n>   ssh+git://git-server/var/scm/user/Test.git\n> \n> Is this intentional?\n\ngit+ssh has nothing to do with git-daemon, it's executing other git\ncommands remotely.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\n#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj\n$/=unpack('H*',$_);$_=`echo 16dio\\U$k\"SK$/SM$n\\EsN0p[lN*1\n"}]}