Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

github

I'm having issues pushing a new git changeset to the github repository. First I cloned my local changes with a depth of 1 to remove the history as:

git clone --depth 1 file:///Users/kunal<path to project>

Then I ran a git init remote add and push as inside of the directory I cloned:

> git init  
> git remote add origin https://github.com/kp27/pymovie2.git 

> git push -u origin master

I see the files upload, but then I get:

Counting objects: 7110, done.

Delta compression using up to 8 threads.

Compressing objects: 100% (3785/3785), done.

Writing objects: 100% (7110/7110), 7.60 MiB | 247 KiB/s, done.

Total 7110 (delta 2283), reused 7110 (delta 2283)

error: unpack failed: index-pack abnormal exit

Any ideas what could be causing this? My first guess is the depth of 1 is causing it, but I am not sure why.

like image 502
Kunal Avatar asked Dec 20 '12 00:12

Kunal


4 Answers

I deleted contents of /.git/ and tried again - it worked. Be careful doing this.

Story: I had similar problem related to some error in renaming folders, which persisted even after deletion and (re-)cloning

(on mac os x): I first copied my files to a safe directory on computer, then navigated into /.git/ and deleted all contents (cmd-shift-g ".git" in Finder) and finally deleted /.git/ in terminal

then was able to commit and push

like image 195
Paul Avatar answered Oct 31 '22 13:10

Paul


You need to contact github for this, it's something on the receiving end.

You could also clone the github repository and instead of cloning your local files, just copy them over and add them.

like image 40
Peter van der Does Avatar answered Oct 31 '22 12:10

Peter van der Does


For me this happened, when I tried to push the new files which are not added to the index. try adding the files to index using Team-> Add To Index in eclipse thru EGit plugin.

like image 1
Varun Sharma Avatar answered Oct 31 '22 13:10

Varun Sharma


I had the same case, not gitgub, but for another repo git. If you can, check if the user who is logged in with git has permission to write to these directories, and if not then in chmod and continue to know you already know...

like image 1
Adam111p Avatar answered Oct 31 '22 11:10

Adam111p