Reputation: 11439
I try to push my git repository to an empty gitlab repo. But I get the following error:
remote: error: object e2c586089171e13888609613eca5e589f49b717b: nullSha1: contains entries pointing to null sha1
remote: fatal: Error in object
error: unpack failed: index-pack abnormal exit
To [email protected]:newrepo.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '[email protected]:newrepo.git'
I am using the same repo with another remote and also with github and everything works fine.
I also tried git repack remote/origin/master
as suggested by this post, but it does not help.
Upvotes: 3
Views: 6778
Reputation: 539
I know this is an old question, but I guess many people might still experience this issue. In my case, this has happened every single time I tried to push slightly bigger commit (not just a few staged hunks, but also multiple new directories and files) to GitLab via SSH (HTTPS never allowed me to even checkout at all on GitLab, even though BitBucket, GitHub and our own GitBlit worked fine) using Windows build of SourceTree. Lost hours messing with repack and compression settings, trying different versions of GIT and SourceTree, but it never worked.
Strangely enough, all I had to do was to switch SourceTree's SSH Client from Putty to OpenSSH, run ssh-keygen in its terminal, and upload the new public key to GitLab (and probably add it back to SourceTree in the Tools menu). The push went through immediately.
Hope it helps somebody :-).
Upvotes: 3