git Git推送错误:解包失败:索引包异常退出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39362918/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git push error: unpack failed: index-pack abnormal exit
提问by Rachita Nanda
I'm able to pull but Unable to git push
我可以拉但无法 git push
$ git push -u origin master
Counting objects: 2031, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1367/1367), done.
remote: fatal: early EOF
Writing objects: 100% (2031/2031), 34.33 MiB | 100.00 KiB/s, done.
Total 2031 (delta 659), reused 1056 (delta 324)
error: unpack failed: index-pack abnormal exit
To https://*********.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to 'https://*********
I have tried :
我试过了 :
- git repack
- git git config --global core.compression 0
- git重新打包
- git git config --global core.compression 0
I have already referred to the following links but nothing is working for me
我已经参考了以下链接,但没有任何效果对我有用
Git push failed - unpack-objects abnormal exit
Git 推送失败 - unpack-objects 异常退出
fatal: early EOF fatal: index-pack failed
Git push fails with "fatal: early EOF" when PUSHing but only on one file
推送时,Git 推送失败并显示“致命:早期 EOF”,但仅限于一个文件
Other git users are able to push to the same repo, usually this problem occurs when in commit large no of new files are added
其他 git 用户能够推送到同一个 repo,通常在提交大量新文件时会出现此问题
None of the above solutions have helped and I'm stuck.
上述解决方案都没有帮助,我被卡住了。
Thanks
谢谢
EDIT
编辑
Also tried
也试过
[core]
packedGitLimit = 512m
packedGitWindowSize = 512m
[pack]
deltaCacheSize = 2047m
packSizeLimit = 2047m
windowMemory = 2047m
回答by Phil Brown
Try using the --no-thin option of git push.
尝试使用 git push 的 --no-thin 选项。
$ git push --no-thin
From https://git-scm.com/docs/git-push:
从https://git-scm.com/docs/git-push:
--[no-]thin
These options are passed to git-send-pack[1]. A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common. The default is --thin.
--[无-]薄
这些选项被传递给 git-send-pack[1]。当发送方和接收方共享许多相同的对象时,精简传输会显着减少发送的数据量。默认是--thin。
Our team has struggled with this same issue and has tried all of the fixes/workarounds mentioned in the OP links, with various success. What works for some didn't work for others, nor would it work for the same person a few months later. So far, the --no-thin option has been working well.
我们的团队一直在努力解决同样的问题,并尝试了 OP 链接中提到的所有修复/解决方法,并取得了各种成功。对某些人有效的方法对其他人无效,几个月后对同一个人也无效。到目前为止,--no-thin 选项运行良好。
回答by oussaka
The problem comes from the version of NFS your Vagrant NFS mount. You have to use version 4 which is not available in Windows. Use temporarily default synced folders on Windows instead of NFS.
问题来自 Vagrant NFS 挂载的 NFS 版本。您必须使用在 Windows 中不可用的版本 4。在 Windows 上使用临时默认同步文件夹而不是 NFS。
回答by Meter Xu
Maybe the entire folder permissions are not set,chown -R git:git /your path
可能整个文件夹权限都没有设置,chown -R git:git /your path
回答by Flows
If you are the git administrator, connect on the server hosting the git repository. There, go into objects
folder. There should have folder with root owner, which is your problem.
如果您是 git 管理员,请连接托管 git 存储库的服务器。在那里,进入objects
文件夹。应该有根所有者的文件夹,这是您的问题。
Change folder owner to be equal to other on the folder (not root).
将文件夹所有者更改为与文件夹上的其他人相同(不是根)。