LFS exists on the server, but it doesn't work properly (missing in database) #13864

Closed
opened 2025-11-02 10:55:28 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @leizhiren on GitHub (Dec 20, 2024).

Description

I've encountered a problem. I've searched all over the Internet but haven't found a solution. The LFS files do exist on the server. When I clone them down and check the sha256, I can find the LFS files on the server. However, Gitea prompts that the LFS files are missing. If I clone them again, it will also prompt that the LFS files don't exist. Just because I manually renamed the git/lfs folder and then changed it back, what should I do? Now the LFS of all repositories doesn't work. Is there anyone who can help me solve this problem? The LFS files are all on the server, but Gitea insists that they don't exist. What should I do? I'm really worried.

Gitea Version

22.6.0 built with GNU Make 4.4.1, go1.22.10 : bindata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

fd2e99757aa2700a2c7c8445945708f3
e1920ac10182eb524a3fabd97cc67fd1
5176473f68e9f54b4055a531eeb2bdae

Git Version

git version 2.45.2

Operating System

Host Debian

How are you running Gitea?

Docker official image

Database

MySQL/MariaDB

Originally created by @leizhiren on GitHub (Dec 20, 2024). ### Description I've encountered a problem. I've searched all over the Internet but haven't found a solution. The LFS files do exist on the server. When I clone them down and check the sha256, I can find the LFS files on the server. However, Gitea prompts that the LFS files are missing. If I clone them again, it will also prompt that the LFS files don't exist. Just because I manually renamed the git/lfs folder and then changed it back, what should I do? Now the LFS of all repositories doesn't work. Is there anyone who can help me solve this problem? The LFS files are all on the server, but Gitea insists that they don't exist. What should I do? I'm really worried. ### Gitea Version 22.6.0 built with GNU Make 4.4.1, go1.22.10 : bindata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![fd2e99757aa2700a2c7c8445945708f3](https://github.com/user-attachments/assets/fe46c836-819f-4ef9-9491-97166c748b5f) ![e1920ac10182eb524a3fabd97cc67fd1](https://github.com/user-attachments/assets/49ddba25-a0f9-4562-992c-97457ff6977f) ![5176473f68e9f54b4055a531eeb2bdae](https://github.com/user-attachments/assets/c4557c71-c5e4-4bcd-9384-3040c405f905) ### Git Version git version 2.45.2 ### Operating System Host Debian ### How are you running Gitea? Docker official image ### Database MySQL/MariaDB
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 10:55:28 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Dec 20, 2024):

It means that it doesn't exit in database.

You could try to git lfs push --all to re-push all LFS files

@wxiaoguang commented on GitHub (Dec 20, 2024): It means that it doesn't exit in database. You could try to `git lfs push --all` to re-push all LFS files
Author
Owner

@leizhiren commented on GitHub (Dec 20, 2024):

这意味着它不存在于数据库中。

您可以尝试git lfs push --all重新创建所有 LFS 文件

那我几十个代码仓库都需要做这个事情,而且,还有很多仓库是并没有克隆到本地的,无法执行git lfs push --all

Then I need dozens of code repositories to do this, and there are many repositories that are not cloned locally and cannot execute git lfs push --all

@leizhiren commented on GitHub (Dec 20, 2024): > 这意味着它不存在于数据库中。 > > 您可以尝试`git lfs push --all`重新创建所有 LFS 文件 那我几十个代码仓库都需要做这个事情,而且,还有很多仓库是并没有克隆到本地的,无法执行git lfs push --all Then I need dozens of code repositories to do this, and there are many repositories that are not cloned locally and cannot execute git lfs push --all
Author
Owner

@wxiaoguang commented on GitHub (Dec 20, 2024):

Then maybe need to figure out how to recover the database records

@wxiaoguang commented on GitHub (Dec 20, 2024): Then maybe need to figure out how to recover the database records
Author
Owner

@leizhiren commented on GitHub (Dec 20, 2024):

Then maybe need to figure out how to recover the database records

Yes, do you know how you can help me?

@leizhiren commented on GitHub (Dec 20, 2024): > Then maybe need to figure out how to recover the database records Yes, do you know how you can help me?
Author
Owner

@wxiaoguang commented on GitHub (Dec 20, 2024):

The only thing I can remember is that there is a LFS tool on the settings page. Some LFS objects could be recovered there.

image

@wxiaoguang commented on GitHub (Dec 20, 2024): The only thing I can remember is that there is a LFS tool on the settings page. Some LFS objects could be recovered there. ![image](https://github.com/user-attachments/assets/a6d752ae-bf4c-4251-8512-6469d9ea95cb)
Author
Owner

@leizhiren commented on GitHub (Dec 20, 2024):

image
image

Thank you, but what's going on here?

@leizhiren commented on GitHub (Dec 20, 2024): ![image](https://github.com/user-attachments/assets/c63a82fc-9ddc-45ca-a312-3ba086053c8d) ![image](https://github.com/user-attachments/assets/6405c142-83dd-4751-b641-a2d4286c4e4a) Thank you, but what's going on here?
Author
Owner

@leizhiren commented on GitHub (Dec 20, 2024):

The only thing I can remember is that there is a LFS tool on the settings page. Some LFS objects could be recovered there.

image

It seems to be OK. It seems that after clicking the link, wait for a while. The single warehouse is repaired. Thank you. Is there a way to batch all warehouses?

@leizhiren commented on GitHub (Dec 20, 2024): > The only thing I can remember is that there is a LFS tool on the settings page. Some LFS objects could be recovered there. > > ![image](https://private-user-images.githubusercontent.com/2114189/397717643-a6d752ae-bf4c-4251-8512-6469d9ea95cb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzQ2OTI3NDIsIm5iZiI6MTczNDY5MjQ0MiwicGF0aCI6Ii8yMTE0MTg5LzM5NzcxNzY0My1hNmQ3NTJhZS1iZjRjLTQyNTEtODUxMi02NDY5ZDllYTk1Y2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTIyMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEyMjBUMTEwMDQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGQ1N2EyMjNkNmVkZDRhZGVjMGI3MzIwOGZlNjM1ZjU1NTBlMTY2ZjUyZDNmMTNjMjJhZjNkN2JkNzFhMjI1NCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.kWT9GkeGF84tLcW_EzFcW9GIfUXQo0PsPYGhJEafCRU) It seems to be OK. It seems that after clicking the link, wait for a while. The single warehouse is repaired. Thank you. Is there a way to batch all warehouses?
Author
Owner

@GiteaBot commented on GitHub (Jan 19, 2025):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Jan 19, 2025): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13864