threads / discuss / 20216

cloning to remote

Subject: cloning to remote

## tl;dr

2 messages between Jul 24, 2009 and Jul 24, 2009.

replies: 1people: 2as markdown or json

Roald de Vries· Jul 24, 2009, 10:10 UTC · lore
Hi all,

Ik normally init my repositories on my laptop, and later would like to clone them to my server. This seems to require that I login to my server and clone from my laptop, which again requires me to run an sshd on my laptop, and - because it's always behind a router - to 'ssh -R' (remote port forwarding) to access it.

Did I miss something, and can I do something like 'git clone localdir ssh://server/path'? 
  Or otherwise, wouldn't that be something to add?
Kind regards, Roald
Allen Johnson· Jul 24, 2009, 13:58 UTC · re: Roald de Vries · lore

Re: cloning to remote

I'm not sure about cloning to a remote url but you could do the clone locally then secure copy it to your server.

$ git clone --bare project1 project1.git $ scp -r project1.git username@server:/path/to/repo

Then, optionally, update your local project1/.git/config and setup default rules for pushing to the server repo.

Allen
On Fri, Jul 24, 2009 at 6:10 AM, Roald de Vries<rdv@roalddevries.nl> wrote:
Show 17 quoted lines
> Hi all,
>
> Ik normally init my repositories on my laptop, and later would like to clone
> them to my server. This seems to require that I login to my server and clone
> from my laptop, which again requires me to run an sshd on my laptop, and -
> because it's always behind a router - to 'ssh -R' (remote port forwarding)
> to access it.
>
> Did I miss something, and can I do something like 'git clone localdir
> ssh://server/path'? Or otherwise, wouldn't that be something to add?
>
> Kind regards, Roald
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

← back to recent threads