[SOLVED] Inaccessible repository and Issue

I have found an instance of an issue (small problem) and a users repository (big problem) that are inaccessible, returning an error 500.

I’m not sure if this happened during my latest update to v1.7.5 or if it happened earlier, but when I check the database the repository is still there (albeit listed as is_empty: t, and size: 0 - more than a bit worrying). Do you have any tips on what I can do to make them accessible again, and/or what might have happened?


EDIT: I realized where I had gone wrong, solution in the comments.

Any log from your log files?

I figured it out: I had accidentally synced my files to the wrong branch, and reverting this resulted in the database entries for certain repositories being faulty.
Specifically, they had gotten:
is_empty: t
is_bare: null,
when the front-end was again back to using “is_bare”. Matching “is_bare” to “is_empty” fixed the problem.

The issue is still eluding me, but I will investigate if it is something similar. I will close this as fixed.


I think I got a similar problem yesterday, that I deleted a tag from the repository X with command line. The Gitea web-side repository X ‘release’ page still shows that tag. I clicked that tag, Gitea displays a 404 page. After that, I went to the ‘site administration’ and processed ‘garbage collection’, the repository X corrupted with an error 500… Still no idea about the reason and solution yet…

Strange; I’ve deleted tags before via the command line and have never noticed that issue. Could the tag be left in the remote repository, or on one of the branches perhaps?

I will have a quick look into the database and see if I can find a “tags” list for individual repos, maybe that way you could remove the reference to the tag in the database if you’re certain that it’s gone from the repo.