-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Some existing and all new PRs for a given repository are broken #30364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Push failed because of some reason. Can you check whether the repository is normal?
|
Yeah, I don't see anything wrong with it. Pushing and pulling from clients works fine too. All the expected bare repo files are intact at that path, and I can execute stuff like Is there anything else I should check? |
Maybe you can check the permission of |
Unfortunately, as I mentioned in my description above, |
So maybe you can check the permission of |
Permissions all seem fine:
It also seems like this issue has now extended to another repository as well. That one still has all its prior entries in |
How does your Gitea instance run? With docker or systemd? |
As mentioned in the ticket, we are running with systemd. I think I have solved the problem however. I tried running the command from the trace log interactively. It fails the same way.
However, executing it with
I went to check and the failing repos all contained git-lfs hook files. These are not present in other repos.
After removing them, it seems the PRs once again work correctly.
This ticket and this one made me a bit suspicious of the hooks. While I did try reset all the hooks from the admin interface when this issue first came up, as prompted by the first issue, I didn't scrutinize the ones present inside the broken repos particularly. (I'm not that familiar with which ones are expected and which ones aren't so I'm not sure I'd have spotted anything wrong at first glance anyway). But it seems the lfs hooks were causing the pushes to fail. After doing this, we are once again able to open new ones. And previously broken ones work again after new commits are pushed to their branches. It does raise the question, though: how did these get here? Are they SUPPOSED to be there? We have been using this gitea instance for about a year now with no issues, until yesterday, so something must have triggered this behaviour. Our system runs the latest available git-lfs from the debian/ubuntu repositories, but it does seem like there is a much newer version of git lfs available via packagecloud repos. Should we install those instead?
|
From the design of Gitea, those hooks should not be there. |
Okay, well it seems this is a valid resolution then. While I am concerned about how this happened in the first place, and it would be nice to know how to ensure that it doesn't happen again both for us and for other users, I suppose it's okay to close this issue. Thank you for your help. |
I have a similar problem, but the hooks mentioned above don't exist:
|
Maybe fixed by #31931 |
Description
One of our Gitea repositories has found itself in a strange state where:
Some supplementary information based on a minor investigation I did:
refs/pull
directory.refs/pull
directory but it is empty.info/refs
refs/pull
directory with no change in behaviour.refs/pull
.The attached logs were captured in trace mode and are all entries printed around when a new PR was opened (and the user receives a 500 error)
Gitea Version
1.21.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/Chippit/be5a1616958d74a4aa61954bd520e32b
Screenshots
No response
Git Version
git version 2.25.1
Operating System
Ubuntu 20.04.6 LTS
How are you running Gitea?
Our instance is deployed from binary distributions retrieved via github, and is managed via a Systemd unit, on virtualised hardware.
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: