-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Error 500 when trying to create some pull requests in Gitea 1.12.5+ #13597
Comments
It's related with git-lfs |
Thanks, @lunny ! Is that the case even if this PR/branch had no LFS-controlled files in the set of changes? Also note that it works fine in Gitea 1.12.4. |
@parnic-sks Sorry this has taken me so long to notice this. It's clear from your logs that your server is running on Windows. The error is coming from: if err := git.Push(headRepoPath, git.PushOptions{
Remote: baseRepoPath,
Branch: pr.HeadBranch + ":" + gitRefName,
Force: true,
// Use InternalPushingEnvironment here because we know that pre-receive and post-receive do not run on a refs/pulls/...
Env: models.InternalPushingEnvironment(pr.Issue.Poster, pr.BaseRepo),
}); err != nil { This is essentially calling: # bashish code
cd $headRepoPath
git push -- $headRepoPath $prHeadBranch":"$gitRefName My guess is that the headRepoPath which comes from Now
From your logs it looks like that that is set to So that leaves a few questions:
|
Worked through this with @zeripath on Discord and the issue was identified as an LFS problem, just as @lunny thought. The repo in question had several hooks installed, specifically a The local fix we came up with was to delete the @zeripath also identified #12839 as the likely cause of this being the reason it appears in 1.12.5 and not 1.12.4 since the clone would not have brought the hooks over, thereby bypassing the issue. Thanks a ton to @zeripath for helping me through this on Discord and @lunny for the original quick diagnosis! |
I'm gonna close this as repositories created by Gitea should not have git LFS hooks installed. Hopefully your comment above should be enough to fit anyone else who experienced this in future to work out how to fix. |
I removed But I still wonder, what is the correct way to use LFS in Gitea? |
Gitea is its own lfs server. As a client you just use LFS as normal - but Gitea's own copy of the repositories must not have LFS hooks installed. |
Thank you very much, I understand. |
Gitea downloaded from GitHub releases. It is being run as a Windows service using nssm.
https://gist.github.com/parnic-sks/224a382950f262c220f681f3b7b762fc
Description
Frequently, when creating a PR on any release higher than 1.12.4, we receive an error 500 followed by
exit status 1
and a long, repeating set of logsCreating the same PR from the same branch on Gitea 1.12.4 works fine. 1.12.5 and 1.12.6 both have this problem 100% for certain branches. Other branches can create PRs without issue. I have not been able to identify the difference that causes some branches to work and others not. We use submodules and LFS, but there doesn't seem to be a common thread between successes and failures.
Screenshots
When creating the PR:
When viewing the PR (one does get created and sends notifications to watchers, but it's empty):

The text was updated successfully, but these errors were encountered: