Git push error: unpack failed: index-pack abnormal exit

 ̄綄美尐妖づ 提交于 2019-12-20 20:19:09

问题


I'm able to pull but Unable to 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

I have already referred to the following links but nothing is working for me

Git push failed - unpack-objects abnormal exit

fatal: early EOF fatal: index-pack failed

Git push fails with "fatal: early EOF" when PUSHing but only on one file

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

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

回答1:


Try using the --no-thin option of git push.

$ git push --no-thin

From 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.

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.




回答2:


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.




回答3:


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.

Change folder owner to be equal to other on the folder (not root).




回答4:


Maybe the entire folder permissions are not set,chown -R git:git /your path



来源:https://stackoverflow.com/questions/39362918/git-push-error-unpack-failed-index-pack-abnormal-exit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!