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

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

From
Elijah Newren <newren@gmail.com>
Date
Feb 12, 2008, 02:22 UTC
Message-ID
<51419b2c0802111822k4600e06bp4167a09b30bf947a@mail.gmail.com>
Hi,

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. remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed fetch-pack from 'ssh://enewren@remote/var/scratch/enewren/votd' failed.

I tried doing a local clone of the same repository (worked fine), a 'git fsck -full' on the relevant repository (reported no errors), and a few other things. After a bit of digging, I found a really ugly hack that works around my problem. After recompiling git on the remote machine with the attached patch, the clone operation succeeded.

Thanks, Elijah

--- git-1.5.4/exec_cmd.c~ 2008-02-01 21:09:01.000000000 -0700 +++ git-1.5.4/exec_cmd.c 2008-02-11 17:35:11.092796000 -0700

@@ -69,7 +69,7 @@
 	const char *tmp;
 
 	strbuf_init(&cmd, 0);
-	strbuf_addf(&cmd, "git-%s", argv[0]);
+	strbuf_addf(&cmd, "/home/enewren/software/install/linux/git/bin/git-%s", argv[0]);
 
 	/*
 	 * argv[0] must be the git command, but the argv array
Next: David Symonds
Message 1 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.