Git development
 help / color / mirror / Atom feed
From: Mark Hills <Mark.Hills@framestore.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Clone to an SSH destination
Date: Mon, 3 Sep 2012 14:07:48 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.01.1209031351200.5945@sys880.ldn.framestore.com> (raw)
In-Reply-To: <CACBZZX7Pe5gsfpFTihE33a1Exia_4dbMQ9p_Xc_z4Ry=Et9KLA@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2529 bytes --]

On Mon, 3 Sep 2012, Ævar Arnfjörð Bjarmason wrote:

> On Mon, Sep 3, 2012 at 12:21 PM, Mark Hills <Mark.Hills@framestore.com> wrote:
> > How do I clone a repo _to_ a new repo over SSH? I tried:
> >
> >   cd xx
> >   git clone --bare . gitserver:/scm/xx.git
> >   git clone --bare . ssh://gitserver/scm/xx.git
> >
> > This does not have the expected result, and instead a local path of the
> > given name is created (eg. a 'gitserver:' directory)
> >
> > This seems to be a FAQ, but the only answer I can find (Google) is to
> > login to the server and create the repo, setup a remote and push to it.
> 
> Basically Git doesn't support this yet, mainly because it could only
> be supported with the ssh or local transports.
> 
> With anything else it would break, so push can only assume that
> something on the other end can receive data, can update branch
> pointers etc. Not create a brand new repository.
> 
> You could of course supply your devs with an alias that ssh's to that
> server, does an init if needed, and then does a push.

Yes, a last resort, but do-able of course.

> > This is quite cumbersome; we have a large team of devs who use a simple
> > 'git clone' to an NFS directory, but we wish to retire NFS access.
> >
> > Is there a technical limiation preventing clone-to-ssh, or just something
> > waiting to be implemented?
> 
> But I'm actually more curious about why you need this in the first
> place, there's a bunch of devs where I work as well, but they never
> have the need to create new repos on some NFS drive in this manner.

Without a command-line onto the filesystem (either local or NFS), how do 
you create a new repository for a new project?

We have a fairly large team on a diverse set of projects. Projects come 
and go, so it's a burden if the administrator is needed just to create 
repos.

Likewise, it's a step backwards for the developer to need to login 
themselves over SSH -- whereas 'git clone' is so easy to NFS.

> What are your devs doing when they do clone their current working 
> directory to some NFS location, maybe there's a better way to do it.

Most projects start as a small test at some point; eg.

  mkdir xx
  cd xx
  git init
  <write some code>
  git commit
  ...

When a project becomes more official, the developer clones to a central 
location; eg.

  git clone --bare . /net/git/xx.git

This is the step that is inconvenient if only SSH access is available.

Thanks for your reply,

-- 
Mark

  reply	other threads:[~2012-09-03 13:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 10:21 Clone to an SSH destination Mark Hills
2012-09-03 11:26 ` Ævar Arnfjörð Bjarmason
2012-09-03 13:07   ` Mark Hills [this message]
2012-09-03 14:08     ` Konstantin Khomoutov
2012-09-03 14:26       ` Sitaram Chamarty
2012-09-03 14:27     ` Enrico Weigelt
2012-09-03 11:47 ` Konstantin Khomoutov
2012-09-03 12:54   ` Sitaram Chamarty
2012-09-03 13:15     ` Mark Hills
2012-09-03 13:48       ` Sitaram Chamarty

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

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

  git send-email \
    --in-reply-to=alpine.LFD.2.01.1209031351200.5945@sys880.ldn.framestore.com \
    --to=mark.hills@framestore.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox