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

Re: Newbie experience with push over ssh

From
MLMatthias Lederhofer <matled@gmx.net>
Date
Feb 14, 2007, 14:27 UTC
Message-ID
<20070214142731.GA1478@moooo.ath.cx>
In-Reply-To
<vpq64a4bzp1.fsf@olympe.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
Show 8 quoted lines
> I could create a local repository, commit in it, but then, I tried to
> push it to a remote machine, on which git is installed.
> 
> I would have expected "push" to do this, but:
> 
> $ git push ssh://machine.fr/tmp/foo 
> fatal: '/tmp/foo': unable to chdir or not a git archive
> fatal: The remote end hung up unexpectedly

git push is can only push into an existing repository, there seems to be no repository in /tmp/foo on machine.fr.

> Then, I tried "clone":
> 
> $ git clone . ssh://machine.fr/tmp/foo

This means: "clone the repository at . to the directory ssh://machine.fr/tmp/foo". The first parameter is the repository to clone from, the second is the directory to put the clone into (this is optional).

I don't think there is any way to 'clone to remote'. You'd have to ssh to the other machine and clone from there, or you can just create an empty repository on the remote host and push the stuff into it.

Previous: Matthieu MoyNext: Joseph Wakeling
Message 2 of 18 in “Newbie experience with push over ssh”
  1. Matthieu MoyFeb 14, 2007
  2. Matthias LederhoferFeb 14, 2007
  3. Joseph WakelingFeb 14, 2007
  4. Bill LearFeb 14, 2007
  5. Joseph WakelingFeb 14, 2007
  6. Bill LearFeb 14, 2007
  7. Joseph WakelingFeb 14, 2007
  8. Bill LearFeb 14, 2007
  9. Matthieu MoyFeb 14, 2007
  10. Joseph WakelingFeb 14, 2007
  11. Nicolas PitreFeb 14, 2007
  12. Joseph WakelingFeb 14, 2007
  13. Jeff KingFeb 14, 2007
  14. Nicolas PitreFeb 14, 2007
  15. Matthieu MoyFeb 14, 2007
  16. Andreas EricssonFeb 15, 2007
  17. Matthias LederhoferFeb 14, 2007
  18. Joseph WakelingFeb 14, 2007

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.