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

Re: Unable to clone an ssh repository (with ugly installation-specific workaround)

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 12, 2008, 10:30 UTC
Message-ID
<alpine.LSU.1.00.0802121028290.3870@racer.site>
In-Reply-To
<47B15ADC.8080309@viscovery.net>
Hi,
On Tue, 12 Feb 2008, Johannes Sixt wrote:
Show 26 quoted lines
> Jakub Narebski schrieb:
> > "Elijah Newren" <newren@gmail.com> writes:
> > 
> >> I'm pretty sure this worked before, but with git-1.5.4, when trying 
> >> to clone a repository via ssh from a machine that does not have git 
> >> installed in a standard system path, I get the following:
> >>
> >> $ git clone -u /home/enewren/software/install/linux/git/bin/git-upload-pack
> >> ssh://enewren@remote/var/scratch/enewren/votd
> >> Initialized empty Git repository in /home/newren/devel/votd/.git/
> >> remote: fatal: exec pack-objects failed.
> > 
> > git-pull(1)
> > [...]
> >        --upload-pack <upload-pack>
> >               When  given,  and  the  repository  to  fetch from is handled by
> >               git-fetch-pack, --exec=<upload-pack> is passed to the command to
> >               specify non-default path for the command run on the other end.
> > 
> 
> The OP *did* use this option (rather, its short form, -u), see above.
> 
> The problem is that git-upload-pack (which is not a built-in) does not
> call setup_path() and so does not extend PATH to contain the special
> installation location. Now, when git-upload-pack tries to exec
> git-pack-objects, it fails since this is not in PATH.
So, let's make git-upload-pack a builtin, no?
Show 5 quoted lines
> A quick work-around for Elijah is to add
> 
>    GIT_EXEC_PATH=/home/enewren/software/install/linux/git/bin
> 
> to .profile on the remote host.

I guess you meant .bashrc, as .profile is not sourced when using ssh transport (it does not spawn a shell) AFAIR.

Ciao, Dscho

Previous: Johannes SixtNext: Johannes Sixt
Message 5 of 11 in “Unable to clone an ssh repository (with ugly installation-specific workaround)”
  1. Elijah NewrenFeb 12, 2008
  2. David SymondsFeb 12, 2008
  3. Jakub NarebskiFeb 12, 2008
  4. Johannes SixtFeb 12, 2008
  5. Johannes SchindelinFeb 12, 2008
  6. upload-pack: Initialize the exec-path.Johannes Sixt, Feb 12, 2008
  7. Johannes SchindelinFeb 12, 2008
  8. Johannes SchindelinFeb 12, 2008
  9. Elijah NewrenFeb 13, 2008
  10. Elijah NewrenFeb 13, 2008
  11. Stephen SinclairFeb 13, 2008

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.