Gitea 1.25: 413 Error on Large LFS Push & Incorrect Commit Author on Windows #15056

Closed
opened 2025-11-02 11:29:06 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @ibeuel on GitHub (Oct 27, 2025).

Description

Environment:

Gitea version: 1.25 (upgraded from 1.24.6)

Git LFS enabled

Windows client

IIS used as reverse proxy

Description:
After upgrading Gitea from 1.24.6 to 1.25, we encountered the following issues:

413 Error on large LFS file push

Large files uploaded via LFS result in HTTP 413 errors.

Rolling back to 1.24.6 triggers database migration errors.

The issue persists after upgrading to 1.25.

Incorrect commit author

When pushing commits, the author is set to the Windows local account instead of the corresponding Gitea account.

Steps to Reproduce:

Configure IIS as a reverse proxy for Gitea 1.25.

Enable Git LFS.

Push a large file via LFS from a Windows client.

Observe the HTTP 413 error.

Check commit author information in Gitea after pushing.

Expected Behavior:

Large LFS files should push successfully without HTTP 413 errors.

Commit author should reflect the correct Gitea account, not the local Windows user.

Additional Notes:

Suspected cause may be related to file size limits in IIS or Gitea LFS handling.

Issue was not present in previous Gitea 1.24.6 version before upgrade.

Gitea Version

1.25

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.51.1.windows.1

Operating System

No response

How are you running Gitea?

Gitea version: 1.25 (nightly, gitea-1.25-nightly-windows-4.0-amd64)

OS: Windows Server 2025

Git LFS enabled

IIS used as reverse proxy

Database

None

Originally created by @ibeuel on GitHub (Oct 27, 2025). ### Description Environment: Gitea version: 1.25 (upgraded from 1.24.6) Git LFS enabled Windows client IIS used as reverse proxy Description: After upgrading Gitea from 1.24.6 to 1.25, we encountered the following issues: 413 Error on large LFS file push Large files uploaded via LFS result in HTTP 413 errors. Rolling back to 1.24.6 triggers database migration errors. The issue persists after upgrading to 1.25. Incorrect commit author When pushing commits, the author is set to the Windows local account instead of the corresponding Gitea account. Steps to Reproduce: Configure IIS as a reverse proxy for Gitea 1.25. Enable Git LFS. Push a large file via LFS from a Windows client. Observe the HTTP 413 error. Check commit author information in Gitea after pushing. Expected Behavior: Large LFS files should push successfully without HTTP 413 errors. Commit author should reflect the correct Gitea account, not the local Windows user. Additional Notes: Suspected cause may be related to file size limits in IIS or Gitea LFS handling. Issue was not present in previous Gitea 1.24.6 version before upgrade. ### Gitea Version 1.25 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.51.1.windows.1 ### Operating System _No response_ ### How are you running Gitea? Gitea version: 1.25 (nightly, gitea-1.25-nightly-windows-4.0-amd64) OS: Windows Server 2025 Git LFS enabled IIS used as reverse proxy ### Database None
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 11:29:06 -06:00
Author
Owner

@ibeuel commented on GitHub (Oct 27, 2025):

I uploaded it to GitHub and used migration as a workaround instead of push.
However, even though I found a way around it, the LFS push command still doesn’t work.

@ibeuel commented on GitHub (Oct 27, 2025): I uploaded it to GitHub and used migration as a workaround instead of push. However, even though I found a way around it, the LFS push command still doesn’t work.
Author
Owner

@lunny commented on GitHub (Oct 27, 2025):

Please check the configuration [lfs]LFS_MAX_BATCH_SIZE.

@lunny commented on GitHub (Oct 27, 2025): Please check the configuration `[lfs]LFS_MAX_BATCH_SIZE`.
Author
Owner

@ibeuel commented on GitHub (Oct 27, 2025):

Please check the configuration [lfs]LFS_MAX_BATCH_SIZE.

LFS_MAX_FILE_SIZE = 0

Even when I set LFS_MAX_FILE_SIZE = 0 for unlimited size, it doesn’t work — and it also doesn’t work when I set a specific size.

@ibeuel commented on GitHub (Oct 27, 2025): > Please check the configuration `[lfs]LFS_MAX_BATCH_SIZE`. LFS_MAX_FILE_SIZE = 0 Even when I set LFS_MAX_FILE_SIZE = 0 for unlimited size, it doesn’t work — and it also doesn’t work when I set a specific size.
Author
Owner

@lunny commented on GitHub (Oct 27, 2025):

Then you should check your IIS configuration. Gitea only returns a 413 (Request Entity Too Large) error when the uploaded file exceeds the LFS_MAX_FILE_SIZE limit. There are no other cases where Gitea itself returns this status code.

@lunny commented on GitHub (Oct 27, 2025): Then you should check your IIS configuration. Gitea only returns a 413 (Request Entity Too Large) error when the uploaded file exceeds the LFS_MAX_FILE_SIZE limit. There are no other cases where Gitea itself returns this status code.
Author
Owner

@eeyrjmr commented on GitHub (Oct 27, 2025):

when you observe the HTTP 413 error, is it in the main Gitea WebUI frame or some other frame?
This is what a gitea sent http error should look like

Image

@eeyrjmr commented on GitHub (Oct 27, 2025): when you observe the HTTP 413 error, is it in the main Gitea WebUI frame or some other frame? This is what a gitea sent http error should look like ![Image](https://github.com/user-attachments/assets/7eeed634-434a-42f5-bf3b-11ef659690c8)
Author
Owner

@ibeuel commented on GitHub (Oct 27, 2025):

Then you should check your IIS configuration. Gitea only returns a 413 (Request Entity Too Large) error when the uploaded file exceeds the LFS_MAX_FILE_SIZE limit. There are no other cases where Gitea itself returns this status code.

I started using version 1.24.3, and everything worked fine until I upgraded to the latest version.
After updating to 1.24.7, I started getting a 413 error, and even after installing version 1.25, the issue still persists.
The IIS configuration is the same as before, and I referred to the reverse proxy setup provided in the documentation.
If this is an IIS issue, which settings should I check or modify?

@ibeuel commented on GitHub (Oct 27, 2025): > Then you should check your IIS configuration. Gitea only returns a 413 (Request Entity Too Large) error when the uploaded file exceeds the LFS_MAX_FILE_SIZE limit. There are no other cases where Gitea itself returns this status code. I started using version 1.24.3, and everything worked fine until I upgraded to the latest version. After updating to 1.24.7, I started getting a 413 error, and even after installing version 1.25, the issue still persists. The IIS configuration is the same as before, and I referred to the reverse proxy setup provided in the documentation. If this is an IIS issue, which settings should I check or modify?
Author
Owner

@eeyrjmr commented on GitHub (Oct 27, 2025):

I am running windows-1. 24.5 and no detected issues (and use LFS)
So you are saying you tried 1.24.7 and faced issues

1.25.6 does have some LFS size fixes
https://github.com/go-gitea/gitea/pull/35277
https://github.com/go-gitea/gitea/pull/35293

Could this have a bug?

I don't want to upgrade to 1.25.0 (cause issues )... But I should be able to upgrade to 1.24.7 (and then downgrade to 1.24.5 ) to see if it is an issue

@eeyrjmr commented on GitHub (Oct 27, 2025): I am running windows-1. 24.5 and no detected issues (and use LFS) So you are saying you tried 1.24.7 and faced issues 1.25.6 does have some LFS size fixes https://github.com/go-gitea/gitea/pull/35277 https://github.com/go-gitea/gitea/pull/35293 Could this have a bug? I don't want to upgrade to 1.25.0 (cause issues )... But I should be able to upgrade to 1.24.7 (and then downgrade to 1.24.5 ) to see if it is an issue
Author
Owner

@ibeuel commented on GitHub (Oct 27, 2025):

I am running windows-1. 24.5 and no detected issues (and use LFS) So you are saying you tried 1.24.7 and faced issues

1.25.6 does have some LFS size fixes #35277 #35293

Could this have a bug?

I don't want to upgrade to 1.25.0 (cause issues )... But I should be able to upgrade to 1.24.7 (and then downgrade to 1.24.5 ) to see if it is an issue

I’m currently using SQLite3, and when I try to use a previous version, it doesn’t work because the database versions are different. For now, I handled it by pushing through a migration on GitHub, and since then, the push has been working fine, so I’m using it as is. I’d like to try reverting to a previous version, but since there are many repositories, it’s not easy.

@ibeuel commented on GitHub (Oct 27, 2025): > I am running windows-1. 24.5 and no detected issues (and use LFS) So you are saying you tried 1.24.7 and faced issues > > 1.25.6 does have some LFS size fixes [#35277](https://github.com/go-gitea/gitea/pull/35277) [#35293](https://github.com/go-gitea/gitea/pull/35293) > > Could this have a bug? > > I don't want to upgrade to 1.25.0 (cause issues )... But I should be able to upgrade to 1.24.7 (and then downgrade to 1.24.5 ) to see if it is an issue I’m currently using SQLite3, and when I try to use a previous version, it doesn’t work because the database versions are different. For now, I handled it by pushing through a migration on GitHub, and since then, the push has been working fine, so I’m using it as is. I’d like to try reverting to a previous version, but since there are many repositories, it’s not easy.
Author
Owner

@eeyrjmr commented on GitHub (Oct 27, 2025):

The problem is 1.25 upgraded the db (it's about to be released)
If you edit the dB to use a lower number it will likely break the schema. Best thing Todo is hols tight and get this fixed for 1.25

@eeyrjmr commented on GitHub (Oct 27, 2025): The problem is 1.25 upgraded the db (it's about to be released) If you edit the dB to use a lower number it will likely break the schema. Best thing Todo is hols tight and get this fixed for 1.25
Author
Owner

@eeyrjmr commented on GitHub (Oct 27, 2025):

I have just tested using windows

  1. 1.24.5 and clone & push LFS file (was a txt file configured for lfs)
  2. upgrade to 1.24.7 and clone and push LFS file
  3. upgrade to 1.25.0-rc0 and clone and push LFS file

everything appears to work. Something else is going on here

@eeyrjmr commented on GitHub (Oct 27, 2025): I have just tested using windows 1. 1.24.5 and clone & push LFS file (was a txt file configured for lfs) 2. upgrade to 1.24.7 and clone and push LFS file 3. upgrade to 1.25.0-rc0 and clone and push LFS file everything appears to work. Something else is going on here
Author
Owner

@ibeuel commented on GitHub (Oct 28, 2025):

I downloaded all the Gitea repositories to my computer and reinstalled Gitea with the 1.25 nightly version.
I also deleted the old folders and set everything up completely from scratch.
Then, I reconfigured the repositories using the Gitea API.
After that, everything works perfectly.
Thank you all!

@ibeuel commented on GitHub (Oct 28, 2025): I downloaded all the Gitea repositories to my computer and reinstalled Gitea with the 1.25 nightly version. I also deleted the old folders and set everything up completely from scratch. Then, I reconfigured the repositories using the Gitea API. After that, everything works perfectly. Thank you all!
Author
Owner

@eeyrjmr commented on GitHub (Oct 28, 2025):

Ok great you found a workaround

I was going to recommend "gitea doctor" to repair

However, there does appear to be a bug in gitea doctor when all check are run (IE the LFS garbage) @lunny

@eeyrjmr commented on GitHub (Oct 28, 2025): Ok great you found a workaround I was going to recommend "gitea doctor" to repair However, there does appear to be a bug in gitea doctor when all check are run (IE the LFS garbage) @lunny
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15056