git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Creating new repos

From
Horst H. von Brand <vonbrand@inf.utfsm.cl>
Date
Oct 27, 2006, 17:08 UTC
Message-ID
<200610271708.k9RH8thM022812@laptop13.inf.utfsm.cl>
In-Reply-To
<pasky@suse.cz>
Petr Baudis <pasky@suse.cz> wrote:
Show 15 quoted lines
> Dear diary, on Fri, Oct 27, 2006 at 02:29:10PM CEST, I got a letter
> where "Horst H. von Brand" <vonbrand@inf.utfsm.cl> said that...
> > I'm trying to set up git repos for remote access here. I set up git-daemon
> > and got it working (some older repositories do work fine), but now:
> > 
> >   $ mkdir /var/scm/user/SomeRepo.git
> >   $ cd /var/scm/user/SomeRepo.git
> >   $ git --bare init-db
> >   $ touch git-daemon-export-ok
> > 
> > All OK, but then, from a remote machine:
> > 
> >   $ git clone git://git-server/user/SomeRepo.git
> >   fatal: no matching remote head
> >   fetch-pack from 'git://git-server/user/Test.git' failed.
> > The empty repo created by init-db should be cloneable, so as to get the
> > ball rolling easily.
Show 5 quoted lines
> Well there's really nothing to clone, so it's tough. :-) What would such
> a clone be supposed to do? It has no branches to record as belonging to
> origin, and note that Git's git-clone is long-term broken in the sense
> that it won't pick new branches as they appear in the remote
> repository. So a clone of an empty repository would be useless anyway.
As useless as the empty set? ;-)
> > You can't push into such an empty repository either.
> 
> This is supposed to work. What error do you get?
Pilot error. Sorry for the noise.
Show 6 quoted lines
> > Any suggestion of how to set up a server into which users can create their
> > own repos /without/ giving out full shell accounts?
> 
> Sure:
> 
> 	http://repo.or.cz/w/repo.git

Cloning... "error: Can't lock ref" (?)

OK, got it; the repo is at git://repo.or.cz/repo.git. Better not calling it *.git

> But it may be quite an overkill for you. ;-)
Will see.
Show 7 quoted lines
> If you want them to be able to do it over ssh, you would need to provide
> a trusted tool which would manage the repository setup, that means not
> only doing init-db, but also managing the export-ok files, description
> file, you'd likely want to enable the post-update hook (but probably not
> any other hook or let the user edit it since at that point you've given
> him full shell access), etc. And the tool would have to be carefully
> reviewed since it's security-critical.
I was fearing something along these lines...
Show 11 quoted lines
> > Also, the behaviour of git-daemon is different when using git or ssh+git,
> > you need to give the full path for the later but not the former (given
> > --base-path=/var/scm):
> > 
> >   git://git-server/user/Test.git
> >   ssh+git://git-server/var/scm/user/Test.git
> > 
> > Is this intentional?
> 
> git+ssh has nothing to do with git-daemon, it's executing other git
> commands remotely.
OK. But from an UI POW it is confusing.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                    Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria             +56 32 2654239
Previous: Horst H. von BrandNext: Jakub Narebski
Message 11 of 12 in “Re: cg-mv”
  1. Horst von BrandOct 12, 2005
  2. Horst von BrandOct 21, 2005
  3. Horst von BrandOct 21, 2005
  4. Petr BaudisOct 23, 2005
  5. Horst von BrandOct 23, 2005
  6. Petr BaudisOct 23, 2005
  7. Horst von BrandOct 24, 2005
  8. Horst H. von BrandOct 25, 2006
  9. Junio C HamanoOct 25, 2006
  10. Horst H. von BrandOct 26, 2006
  11. Horst H. von BrandOct 27, 2006
  12. Jakub NarebskiOct 28, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.