git lfs pushed files are empty #5024

Closed
opened 2025-11-02 06:11:31 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @markus-seidl on GitHub (Mar 8, 2020).

Description

I try to push files from a client repository that has LFS enabled. LFS is enabled on the server and the push succeeds. Also the settings page of the repository lists the files as stored in the repository with their correct sizes.
However, on the next

  • clone
  • Zip download of the repository
  • Or direct download via web ui
    the files are empty or result in a 500 error. The 500 is, because the files are not there.

Screenshots

Originally created by @markus-seidl on GitHub (Mar 8, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.11.2 - Git version: 2.17.1; git-lfs 2.3.4 - Operating system: Ubuntu 18.04 - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant; LFS not enabled on try.gitea.io ! - Log gist: https://gist.github.com/markus-seidl/c9f51da5e5855d811581970517e0b339 ## Description I try to push files from a client repository that has LFS enabled. LFS is enabled on the server and the push succeeds. Also the settings page of the repository lists the files as stored in the repository with their correct sizes. However, on the next * clone * Zip download of the repository * Or direct download via web ui the files are empty or result in a 500 error. The 500 is, because the files are not there. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@markus-seidl commented on GitHub (Mar 8, 2020):

The solution is: The server didn't have access to the lfs directory and was swallowing the exception / warning / error.

I would suggest the exception about not being able to access the lfs directory should show up somewhere :)

@markus-seidl commented on GitHub (Mar 8, 2020): The solution is: The server didn't have access to the lfs directory and was swallowing the exception / warning / error. I would suggest the exception about not being able to access the lfs directory should show up somewhere :)
Author
Owner

@zeripath commented on GitHub (Mar 8, 2020):

I was about to say that your logs looked a bit sparse...

Looking at the code error should have been passed to the client at least - which is also incorrect because these errors might need sanitising.

Sigh I guess I'll have to go through and add logging to this.

@zeripath commented on GitHub (Mar 8, 2020): I was about to say that your logs looked a bit sparse... Looking at the code error should have been passed to the client at least - which is also incorrect because these errors might need sanitising. *Sigh* I guess I'll have to go through and add logging to this.
Author
Owner

@zeripath commented on GitHub (Mar 8, 2020):

Oh yeah I remember git-lfs may keep hitting the server if it gets a 500! So returning 500 for a permanent error will cause badness.

@zeripath commented on GitHub (Mar 8, 2020): Oh yeah I remember git-lfs may keep hitting the server if it gets a 500! So returning 500 for a permanent error will cause badness.
Author
Owner

@markus-seidl commented on GitHub (Mar 10, 2020):

Thank you very much! @zeripath

@markus-seidl commented on GitHub (Mar 10, 2020): Thank you very much! @zeripath
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5024