Search code examples
ruby-on-railsgitherokugithubcloud9-ide

Git push heroku master fails with "remote: fatal: early EOF error: unpack failed: index-pack abnormal exit"


Beginner here stumped as to why my git pushes to Heroku are failing all of a sudden:

a101291@pinteresting:~/workspace (master) $ git push heroku master
Counting objects: 2043, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1997/1997), done.
Writing objects: 100% (2021/2021), 35.58 MiB | 4.20 MiB/s, done.
Total 2021 (delta 847), reused 0 (delta 0)

...now it hangs for ~15 minutes and then:

remote: fatal: early EOF
error: unpack failed: index-pack abnormal exit
To https://git.heroku.com/omr101291.git
 ! [remote rejected] master -> master (unpacker error)

Tried again a few times to no avail. Also tried restarting the dyno and heroku repo:rebuild but still no luck. I am running this from an Ubuntu instance on Cloud9 IDE and the repo is here: https://github.com/101291/pinteresting (pushes to Github are working fine).

Any help would be much appreciated!

Thanks


Solution

  • I had the same issue (I was trying to push what turned out to be really large files!) and what fixed it was: git push heroku master --no-thin

    If you're interested, here is a brief explanation from the git docs:

    --[no-]thin These options are passed to git-send-pack1. 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.