git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Marco Maggesi <marco.maggesi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: New to git
Date: Fri, 8 Apr 2011 16:10:25 -0400	[thread overview]
Message-ID: <20110408201024.GA15964@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTimy-95OJGxU9XzcaR=0jTJWXOwsDg@mail.gmail.com>

On Fri, Apr 08, 2011 at 09:43:09PM +0200, Marco Maggesi wrote:

> Now I would like to setup a repository on a server and use it as a
> central point of distribution for a few other computers.
> As far as I can understand, the default mechanism for push / pull
> requires that git is installed on every machine, including the server.

Yes, it's the default, but there are other mechanisms that don't require
server support. For example, rsync, and dumb http and ftp support.
They're not as efficient, but they do work.

For pushing, they are not as convenient. The dumb http push support goes
over DAV, so you must have a DAV server set up. Similarly, the rsync
support does not (as far as I know) do rsync-over-ssh, but expects to
connect to the rsync daemon directly.

But if you are just using the server as a distribution point for a
single repository, it can be much simpler. For example, if you always
just want to push and overwrite what is on the server (i.e., like a
mirror), you can just use plain rsync outside of git. To avoid mirror
lag, you do want to update the objects before the refs. So this:

  LOCAL=/path/to/repo.git
  REMOTE=server:path/to/repo.git
  rsync -a $LOCAL/objects/ $REMOTE/objects/
  rsync -a $LOCAL $REMOTE

would work. And then expose repo.git on the server via http or ftp, and
clients can clone directly from it.

> My problem is that I can hardly install git on the server for several
> reasons that I will not explain here (also I'm not the administrator
> of the server).

You didn't list your reasons, so I'll assume they're good. But note that
you don't need to be the administrator to accept a git push. You can
build it as a regular user, and have git connect over ssh and run the
server side.

> For the moment I came only to the following idea: mount the remote
> repository via fuse-ssh and use the local installation of git to push
> / pull changes.
> Surely it is inefficient but I don't care too much (my repositories
> are small enough I think).
> Can you see other drawbacks of this solution?

That is inefficient, but I think it would work OK. If you are doing
that, though, you are probably better off just rsyncing the whole result
as I showed above. It's less inefficient and easier to set up (if you
have rsync on the server, of course).

-Peff

  reply	other threads:[~2011-04-08 20:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 19:43 New to git Marco Maggesi
2011-04-08 20:10 ` Jeff King [this message]
2011-04-09 19:15   ` Marco Maggesi
2011-04-09 19:35     ` Dmitry Potapov
2011-04-09 22:41     ` Matthieu Moy
2011-04-08 22:54 ` Pushing to a "dumb" server (Re: New to git) Jonathan Nieder
  -- strict thread matches above, loose matches on Subject: below --
2007-08-27 19:43 new to git Kyle Rose
2007-08-27 20:11 ` J. Bruce Fields
2007-08-27 20:22 ` Andreas Ericsson
2007-08-27 20:36   ` Kyle Rose
2007-08-27 20:39   ` Junio C Hamano
2007-08-27 21:14     ` Andreas Ericsson
2007-09-05  5:56 ` Jan Hudec
2007-09-05  6:54 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110408201024.GA15964@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=marco.maggesi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).