“索引包失败” [英] "Index-pack failed"

查看:143
本文介绍了“索引包失败”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在克隆一个git仓库时,我收到一条我无法理解的错误消息。

  $ git clone git@pinocchio.unibe.ch:group07 
在/ cygdrive / C /用户/ Martin Bigler / p2 / group07 /。
remote:计数对象:2269,完成。
remote:压缩对象:100%(1936/1936),完成。
git:'index-pack'不是一个git命令。参见'git --help'。

有什么可能导致这种行为?

解决方案

这类似于 ticket 269


git index-pack 不是内置的在 git.exe 中,所以 git.exe 需要找到 git-index- pack.exe $ GIT_EXEC_PATH 中(通常应该是 / libexec / git-core / )。你有 /libexec/git-core/git-index-pack.exe


因为如果是这样,这是导致错误的服务器,而不是本地安装的git进行推送。



您可以尝试交互式地进行日志记录,检查索引包是可用的:

  $ ssh git#***.com@***.com 
输入密码'/c/Users/***/.ssh/id_rsa'的密码:
上次登录:星期二2月9日13:48:32 2010 from ***
-bash-3.2 $ git版本
git版本1.6.1
-bash-3.2 $ git-index-pack
用法:git index-pack [-v] [-o< index-file>] [{ ---保持| --keep = LT; MSG> }] [--strict]
{< pack-file> | --stdin [--fix-thin] [< pack-file>]}

提示以下答案:


在记录日志时发现您的 git-index-pack 交互式。

但显然不是当你没有交互式登录。

这表明你已经适当地调整了你的 PATH $ HOME / .profile $ HOME / .bash_profile ,但不在 HOME /中。

结论:


我的解决方案是:



  ssh user @ server 
cp .bash_profile .bashrc


upon cloning a git repository, I get an error message that I can't quite grasp.

$ git clone git@pinocchio.unibe.ch:group07
Initialized empty Git repository in /cygdrive/C/Users/Martin Bigler/p2/group07/.
remote: Counting objects: 2269, done.
remote: Compressing objects: 100% (1936/1936), done.
git: 'index-pack' is not a git-command. See 'git --help'.

What could possibly cause this behavior?

解决方案

Is this similar to ticket 269?

git index-pack isn't a built-in in git.exe, so git.exe needs to find git-index-pack.exe in $GIT_EXEC_PATH (which should usually be "/libexec/git-core/"). Do you have "/libexec/git-core/git-index-pack.exe"?

Because if it is, this is the server which causes the error, not the locally installed git doing the push.

You can try logging interactively and check index-pack is available:

$ ssh git#***.com@***.com
Enter passphrase for key '/c/Users/***/.ssh/id_rsa':
Last login: Tue Feb  9 13:48:32 2010 from ***
-bash-3.2$ git version
git version 1.6.1
-bash-3.2$ git-index-pack
usage: git index-pack [-v] [-o <index-file>] [{ ---keep | --keep=<msg> }] [--strict] 
{ <pack-file> | --stdin [--fix-thin] [<pack-file>] }

That test prompted the following answer:

Your git-index-pack is found when logging in interactively.
But apparently not when you do not log in interactively.
That suggests that you adjusted your PATH appropriately in $HOME/.profile or $HOME/.bash_profile, but not in HOME/.bashrc

And the conclusion:

My solution is:

ssh user@server
cp .bash_profile .bashrc

这篇关于“索引包失败”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆