-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
500 error when when trying to transfer repository from user to organization #17044
Comments
Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems We need the logs for the 500 |
I've just updated the linked gist as per your debugging instructions. It looks like the error in question is this:
|
OK so the error report is coming from: gitea/routers/web/repo/setting.go Line 593 in 659b946
but the error is actually created: Line 266 in 659b946
and will actually come from: gitea/models/repo_collaboration.go Lines 88 to 91 in 659b946
Now the interesting part here is that this implies that there is a user (user id: 38) who is listed as a collaborator of that repo who is no longer in existence. This is a db consistency issue but I think we should just handle this by ignoring this user. |
Interesting! I deleted a bunch of a spammers a while back, and it's possible that impacted a collaborator on the repo in question. So maybe this is a non-issue for other Gitea instances? |
Well it's kinda bad that this kills things - we should simply tolerate and not die. I also don't think that our doctor will fix this inconsistency either so that needs fixing too. |
I think you could probably just manually remove the collaborator with that userid from the table directly and the problem will go away for you however we need to fix this so leave this bug open and PR will close it. |
Got it! I confirmed that deleting the dangling collaborator from the Thanks for your help! |
It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error. This PR makes `repo.getCollaborators()` nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check. Fix go-gitea#17044 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Nicely handle missing user in collaborations It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error. This PR makes `repo.getCollaborators()` nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check. Fix #17044 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Backport go-gitea#17049 It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error. This PR makes `repo.getCollaborators()` nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check. Fix go-gitea#17044 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Backport #17049 It is possible to have a collaboration in a repository which refers to a no-longer existing user. This causes the repository transfer to fail with an unusual error. This PR makes `repo.getCollaborators()` nicely handle the missing user by ghosting the collaboration but also adds consistency check. It also adds an Access consistency check. Fix #17044 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
[x]
):Description
When trying to transfer a repository from my user to an organization I own, I receive a 500 from Gitea and the transfer doesn't go through.
Potentially relevant: #10230
Screenshots
HTTP request payload
The text was updated successfully, but these errors were encountered: