500: fatal: packed object is corrupt

The web interface gives me an 500 error when trying to view one of the repositories. As far as I can see everything else works. The gitea.log says:

2020/02/25 07:31:36 […routers/repo/view.go:55 renderDirectory()] [E] GetCommitsInfo: exit status 128 - error: inflate: data stream error (incorrect data check)
error: failed to unpack compressed delta at offset 12737528 from ./objects/pack/pack-4f40ba00c16eea53bd7559ae788cfc9a32023cff.pack
error: failed to read object 74d16e42308954c8ce6018bcc139bc1081c96fb3 at offset 12737524 from ./objects/pack/pack-4f40ba00c16eea53bd7559ae788cfc9a32023cff.pack
fatal: packed object 74d16e42308954c8ce6018bcc139bc1081c96fb3 (stored in ./objects/pack/pack-4f40ba00c16eea53bd7559ae788cfc9a32023cff.pack) is corrupt

Does anybody know how to repair this?

I am running Gitea on DietPi. No update or other change to trigger this, it has just suddenly broken.

Best regards,

That sounds like a problem with the underlying git repository which has nothing directly to do with gitea. This could be caused by a hard disk failure problem or something else. When you google you can find some hints how this might be resolvable especially if you have backups of your repository.

Some example from a quick search:

Thank you!

I was indeed able to copy the … .pack file from a backup, and that seems to have solved the problem.