-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Error 500 when rendering web view of repository: unknown git object mode 40755 #21190
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
Hmm , the problem is that the parser hard-coded modes. But according to https://git-scm.com/docs/index-format:
Maybe all directories (tree object?) are expected to have mode gitea/modules/git/parse_nogogit.go Lines 113 to 127 in c18d8d6
|
Hey @wxiaoguang, thank you for looking into the details of this bug report. Is there anything I can do to help troubleshoot this further? Any specific file permissions in the repo you want me to check or any further logs that I can provide? Best regards, |
TBH, it's likely related to some git internals, I have no idea about how to debug it easily. If you'd like to have a try, you could try to find the git object id which causes the crash, and put it into the To fix the problem, I think adding a The PR: #21195 , could you try to apply it to see whether the problem could be resolved? |
Hey @wxiaoguang, I rebuilt the docker image from the branch from which you made the pull request and I can confirm the issue I was experiencing is solved with the changes you made. Thanks a lot for taking the time to look into this! I appreciate it very much. Best regards, |
Git uses 040000 for tree object, but some users may get 040755 for unknown reasons Try to fix go-gitea#21190 * go-gitea#21190
Backport #21195 Git uses 040000 for tree object, but some users may get 040755 for unknown reasons, fix #21190 Co-authored-by: techknowlogick <[email protected]>
Description
When trying to access the web interface to view a repository, I get an error 500 error message.
The log in gitea shows the following error:
...ers/web/repo/view.go:803:renderDirectoryFiles() [E] [63249040] ListEntries: unknown mode: 40755
Regular cloning of the git repository via SSH works fine, and the file permissions of the repository in the filesystem also look like all is OK.
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/hollie/bd9a1997a5954803fac0fb3caef9ba84
Screenshots
No response
Git Version
2.36.2
Operating System
docker image 1.17.2
How are you running Gitea?
Running the docker image of version 1.17.2 with a volume mount to store the settings and repos on Ubuntu 22.04.1 LTS.
I have verified the issue is not host specific by restoring from backup on another host. The same repo has the same issues, while other repositories on the same system/database show normal behaviour.
This issue was not present in previous version of gitea.
Database
SQLite
The text was updated successfully, but these errors were encountered: