Search code examples
gitobjectgit-pull

GIT Packfile claims to have more objects, inaccessable


I am running into multiple errors about my packfile that seem pretty insidious, this is a pretty scary deal since this is a live site and am not sure how to handle it, maybe someone can talk me through it, here's whats going on.

It seems that I have a missing object, and also the count of my packfile is bad?

remote: Counting objects: 25733, done.
remote: Compressing objects: 100% (12458/12458), done.
remote: Total 19185 (delta 6914), reused 17995 (delta 6535)

Receiving objects: 100% (19185/19185), 1.69 GiB | 465 KiB/s, done.
Resolving deltas: 100% (6914/6914), completed with 1058 local objects.

error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed

error: unable to find e17196d88ae91dea07b4d61716b91dac581fb131

error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed

fatal: object e17196d88ae91dea07b4d61716b91dac581fb131 not found

EDIT Another one seems to have sprouted up, so now I have ....

.git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack 
.git/objects/pack/pack-931e28ca404e28040a10085dd1534ef12cf18c6d.pack

I've tried copying those both up past www-root, and removing them, and am now running git-gc and am going to try refetching origin with git fetch origin

git-gc now returns

bad sha1 file: .git/objects/05/.a2e1939ce5a53d5ec7c3cacc4df97acd09c6af.hdgIVe
bad sha1 file: .git/objects/80/.1a75684e9d869e9ed7c1ded674c55caa17c524.YUr1Yu
bad sha1 file: .git/objects/8c/.7e8381b3e0d0a1f1d4fa328f0dda0a1dbd814a.L0255H
bad sha1 file: .git/objects/c5/.32926ac2d67785cb8580b885ac3d3fd7075f57.rDsW4H
Removing stale temporary file .git/objects/pack/tmp_pack_jnP5qn

Solution

  • Looks like there is some corruption in the other repo. If it's a central repo, re-clone it from your repo then have everyone push their branches. Your pull should work after that - unless you can't get the message out that you're fixing the repo to everyone..