git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "fatal: index-pack failed" on git-clone
@ 2009-07-08 15:58 Fritz Anderson
  2009-07-08 16:42 ` Junio C Hamano
  0 siblings, 1 reply; 19+ messages in thread
From: Fritz Anderson @ 2009-07-08 15:58 UTC (permalink / raw)
  To: git

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.

Here's the debug transcript:

===========
$ sudo GIT_TRACE=1 git clone myusername@remote.example.com:/Users/ 
myusername/scientia/scientia.git
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
fatal: index-pack failed
remote: Counting objects: 2797, done.
remote: Compressing objects: 100% (2388/2388), done.
$
===========

/Users/myusername/scientia/scientia.git on remote is a symlink to  
a .git repository on another volume. I've verified that the path is  
valid.

One post I saw via Google said that attempting to clone large files  
can choke the process. I've done git-rm on my largest, reconstructable  
files, to no effect. (Though I suppose it does no good wrt the files  
that are still in the history.)

I've fooled around with git-verify-pack without result.

Prior to all this, my last push to the repository failed with  
"[rejected] ... non-fast forward". I got past that with a "git push -- 
force".

How can I get the clone done?

	— F

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: "fatal: index-pack failed" on git-clone
@ 2009-07-09  8:06 Johannes Sixt
  0 siblings, 0 replies; 19+ messages in thread
From: Johannes Sixt @ 2009-07-09  8:06 UTC (permalink / raw)
  To: Jeff King; +Cc: Junio C Hamano, Fritz Anderson, git, Daniel Barkalow

Jeff King schrieb:
> Subject: [PATCH] Makefile: install 'git' in execdir
> 
> When a git command executes a subcommand, it uses the "git
> foo" form, which relies on finding "git" in the PATH.
> Normally this should not be a problem, since the same "git"
> that was used to invoke git in the first place will be
> found.  And if somebody invokes a "git" outside of the PATH
> (e.g., by giving its absolute path), this case is already
> covered: we put that absolute path onto the front of PATH.
> 
> However, if one is using "sudo", then sudo will execute the
> "git" from the PATH, but pass along a restricted PATH that
> may not contain the original "git" directory. In this case,
> executing a subcommand will fail.
> 
> To solve this, we put the "git" wrapper itself into the
> execdir; this directory is prepended to the PATH when git
> starts, so the wrapper will always be found.

I'd love to see this change justified not only by sudo, because
this also helps another use-case where it avoids that between
different vintages of git is switched:

Assume you have a git installed in prefix /usr and another one
in prefix /home/j6t. PATH is /usr/bin:/bin. Consider this command:

   $ git --exec-path=/home/j6t/libexec/git-core gc

Then:

1. It runs /usr/bin/git with builtin gc.

2. It set PATH=/home/j6t/libexec/git-core:/usr/bin:/bin

3. builtin-gc runs git repack (no dash). It picks git-repack
   from /home/j6t. (PATH remains unchanged)

4. git-repack runs git pack-objects.

5. This picked /usr/bin/git and its builtin pack-objects

See how this switches from the version in /usr to /home/j6t
and back to /usr?

With this change it switches from /usr to /home/j6t and
remains there, which is "more correct", IMO (at least
less surprising).

Notice that the problem is not only with --exec-path, but
also with GIT_EXEC_PATH if somebody has it exported
in .profile.

-- Hannes

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-07-13  4:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-08 15:58 "fatal: index-pack failed" on git-clone Fritz Anderson
2009-07-08 16:42 ` Junio C Hamano
2009-07-08 17:10   ` Fritz Anderson
2009-07-08 17:34     ` Junio C Hamano
2009-07-08 18:22       ` Fritz Anderson
2009-07-08 18:49         ` Junio C Hamano
2009-07-08 19:05           ` Daniel Barkalow
2009-07-08 20:05             ` Fritz Anderson
2009-07-08 20:23           ` Fritz Anderson
2009-07-08 20:42           ` Johannes Sixt
2009-07-08 21:12             ` Jeff King
2009-07-08 21:27               ` Fritz Anderson
2009-07-09 18:11               ` Johannes Sixt
2009-07-08 22:48             ` Junio C Hamano
2009-07-09  6:37               ` Jeff King
2009-07-09  8:42                 ` Michael J Gruber
2009-07-09 23:29                 ` A Large Angry SCM
2009-07-13  4:52                   ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2009-07-09  8:06 Johannes Sixt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).