0
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 1.57 KiB | 0 bytes/s, done.
Total 8 (delta 4), reused 0 (delta 0)
remote: error: object file ./objects/fc/71bf7d8648c42b3f7a5502057108721ce8118 is empty
remote: fatal: loose object fc71bf7d8648c42b3f7a55c02057108721ce8118 (stored in ./objects/fc/71bf7d8648c42b3f7a55c02057108721ce8118) is corrupt
error: unpack failed: unpack-objects abnormal exit
 ! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to (insert my repository)

And I also get a bunch of untracked files. Any reason why?

Thanks for any help!

J.Khelly
  • 37
  • 5
  • I think I had this problem once, your git repository is corrupted as far as I can remember, there is little you can do. – Iharob Al Asimi Mar 18 '17 at 03:50
  • oh no! really? this is very disappointing news as I was hoping to finish some code today. Thanks for your help though! – J.Khelly Mar 18 '17 at 03:54
  • There must be something I could do though, right? Can't I clone my repository or something? – J.Khelly Mar 18 '17 at 04:00
  • It looks to me like the problem is on the server. – hobbs Mar 18 '17 at 04:20
  • yeah, for basically the whole day it kept giving me a 404 error saying my repository does not even exist. i am really not sure what has caused this problem as i was able to commit just only a few hours ago :/ – J.Khelly Mar 18 '17 at 04:24
  • this has been a very frustrating couple of hours >:( – J.Khelly Mar 18 '17 at 04:27
  • Can you do a git fsck --full? And can you clone your repo again, and do a git fsck there? – VonC Mar 18 '17 at 04:46
  • 1
    Note: it's the *remote* (i.e., the server) that is detecting a corrupt repository and refusing to take the incoming data. Your local repository may be fine. It's also possible that the corruption is happening during the data transfer, depending on your protocol and checksum methods. – torek Mar 18 '17 at 08:42

1 Answers1

0

It's possible, as Iharob Al Asimi said, that it is corrupted (that is what the error message says after all)

You may also want to check that the permissions for the files are the same. I think I remember seeing this error when trying to push files under a different user name.

For example say you did git clone blah@blahblah under the username "JKhel"

But then you made updates and pushed under the username "admin" after doing su admin. (or vice versa)

Maybe permissions for your actual files are set to 777 but permissions for the object are set to 117.

Check your permissions with ls -la in the path ./objects/fc/

Otherwise check some other posts here with the same error: how to fix GIT error: object file is empty?

Community
  • 1
  • 1
FredMan
  • 831
  • 7
  • 17