Re: "fatal: index-pack failed" on git-clone

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: "fatal: index-pack failed" on git-clone

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:02

Fritz Anderson [off-list ref] writes:
I get the error "fatal: index-pack failed" when I attempt to clone a  
remote bare repository. The repository works well on other machines,  
including the repository's own.

The repository lives on a version of Mac OS X I'm not allowed to talk  
about (I repeat: It works well for working copies on other machines,  
and on its own). The client is RHEL5. Git is version 1.6.3 on both  
machines, and was built from the tarball.
Looking at the output of the trace, I do not think that you have to worry
about people asking for a copy of your repository in order to diagnose
this issue, as I suspect that even a much smaller toy repository will fail
for you in the same way.
Here's the debug transcript:
===========
$ sudo GIT_TRACE=1 git clone myusername@remote.example.com:/Users/ 
myusername/scientia/scientia.git
I have heard that pseudo resets the PATH so you are invoking "git" from
one of those standard system PATH, perhaps /usr/bin.
trace: built-in: git 'clone' 'myusername@remote.example.com:/Users/ 
myusername/scientia/scientia.git'
Initialized empty Git repository in /srv/scientia/.git/
trace: run_command: 'ssh' 'myusername@remote.example.com' 'git-upload- 
pack '\''/Users/myusername/scientia/scientia.git'\'''
Password:
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '-- 
keep=fetch-pack 17580 on local.example.com'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '-- 
keep=fetch-pack 17580 on local.example.com'
trace: exec failed: No such file or directory
trace: exec 'index-pack' failed: No such file or directory
This is saying that "git" on the local side (the one you are running
"clone" on) couldn't find its "index-pack" subcommand.  Why?

I think this is an issue with your RHEL5 box, not the MacOS box.  A quick
check that might be useful is to type:

	$ git index-pack
	$ sudo git index-pack

Re: "fatal: index-pack failed" on git-clone

From: Fritz Anderson <hidden>
Date: 2016-06-15 22:47:02

On Jul 8, 2009, at 11:42 AM, Junio C Hamano wrote:
Fritz Anderson [off-list ref] writes:
...
quoted
$ sudo GIT_TRACE=1 git clone myusername@remote.example.com:/Users/
myusername/scientia/scientia.git
I have heard that pseudo resets the PATH so you are invoking "git"  
from
one of those standard system PATH, perhaps /usr/bin.
quoted
trace: built-in: git 'clone' 'myusername@remote.example.com:/Users/
myusername/scientia/scientia.git'
Initialized empty Git repository in /srv/scientia/.git/
trace: run_command: 'ssh' 'myusername@remote.example.com' 'git- 
upload-
pack '\''/Users/myusername/scientia/scientia.git'\'''
Password:
trace: run_command: 'index-pack' '--stdin' '-v' '--fix-thin' '--
keep=fetch-pack 17580 on local.example.com'
trace: exec: 'git' 'index-pack' '--stdin' '-v' '--fix-thin' '--
keep=fetch-pack 17580 on local.example.com'
trace: exec failed: No such file or directory
trace: exec 'index-pack' failed: No such file or directory
This is saying that "git" on the local side (the one you are running
"clone" on) couldn't find its "index-pack" subcommand.  Why?

I think this is an issue with your RHEL5 box, not the MacOS box.  A  
quick
check that might be useful is to type:

	$ git index-pack
	$ sudo git index-pack
Here is the result:

===
$ git index-pack
usage: git index-pack [-v] [-o <index-file>] [{ ---keep | -- 
keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack- 
file>] }
$ sudo git index-pack
usage: git index-pack [-v] [-o <index-file>] [{ ---keep | -- 
keep=<msg> }] [--strict] { <pack-file> | --stdin [--fix-thin] [<pack- 
file>] }
===

So git is apparently found. HOWEVER, if I do this, it's a different  
story:

===
$ which git
/usr/local/bin/git
$ sudo which git
which: no git in (/usr/bin:/bin)
===

On that evidence, I reissued my problem command under sudo,  
specifying /usr/local/bin/git as the command. That worked. Thank you;  
I would not have found it without you.

I'm obviously ignorant on the path issue, but that's off-topic for  
this list.

Thanks again.

	— F
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help