Skip to content

LFS mirroring fails with some target site #32803

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

Closed
GitEventhandler opened this issue Dec 12, 2024 · 4 comments · Fixed by #32812
Closed

LFS mirroring fails with some target site #32803

GitEventhandler opened this issue Dec 12, 2024 · 4 comments · Fixed by #32812
Labels
Milestone

Comments

@GitEventhandler
Copy link

Description

While using Gitea to mirror an LFS repository, I encountered a problem that prevents the completion of the mirroring process when the target site is ModelScope. This issue has been consistently reproducible across versions 1.22.3, 1.22.4, and 1.23.dev. Below is the log for when an error occurs while mirroring a project (https://www.modelscope.cn/Qwen/Qwen2.5-0.5B-Instruct.git). Same issue does not occur when using the Git CLI directly.

gitea-nightly  | 2024/12/04 13:36:15 ...eb/routing/logger.go:102:func1() [I] router: completed GET /testuser/Qwen2.5-0.5B-Instruct for 127.0.0.1:63974, 200 OK in 6.4ms @ repo/view.go:760(repo.Home)
gitea-nightly  | 2024/12/04 13:36:16 ...eb/routing/logger.go:102:func1() [I] router: completed GET /testuser/Qwen2.5-0.5B-Instruct/-/migrate/status for 127.0.0.1:63974, 200 OK in 4.9ms @ repo/migrate.go:294(repo.MigrateStatus)
gitea-nightly  | 2024/12/04 13:36:17 ...s/lfs/http_client.go:274:handleErrorResponse() [E] Error decoding json: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<html>
gitea-nightly  | <he|..., bigger context ...|<html>
gitea-nightly  | <head><title>400 Request Header Or Cookie T|...
gitea-nightly  | 2024/12/04 13:36:17 ...epository/migrate.go:171:MigrateRepositoryGitData() [E] Failed to store missing LFS objects for repository: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<html>
gitea-nightly  | <he|..., bigger context ...|<html>
gitea-nightly  | <head><title>400 Request Header Or Cookie T|...
gitea-nightly  | 2024/12/04 13:36:17 ...ices/task/migrate.go:60:func1() [E] runMigrateTask[1] by DoerID[1] to RepoID[1] for OwnerID[1] failed: StoreMissingLfsObjectsInRepository: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<html>
gitea-nightly  | <he|..., bigger context ...|<html>
gitea-nightly  | <head><title>400 Request Header Or Cookie T|...
gitea-nightly  | 2024/12/04 13:36:17 ...ervices/task/task.go:53:handler() [E] Run task failed: StoreMissingLfsObjectsInRepository: readObjectStart: expect { or n, but found <, error found in #1 byte of ...|<html>
gitea-nightly  | <he|..., bigger context ...|<html>
gitea-nightly  | <head><title>400 Request Header Or Cookie T|...
gitea-nightly  | 2024/12/04 13:36:19 ...eb/routing/logger.go:102:func1() [I] router: completed GET /testuser/Qwen2.5-0.5B-Instruct/-/migrate/status for 127.0.0.1:63978, 200 OK in 5.4ms @ repo/migrate.go:294(repo.MigrateStatus)
gitea-nightly  | 2024/12/04 13:36:20 ...eb/routing/logger.go:68:func1() [I] router: polling   GET /user/events for 127.0.0.1:63974, elapsed 3585.4ms @ events/events.go:18(events.Events)

Gitea Version

1.22.3, 1.22.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

screenshot

Git Version

2.47.0

Operating System

The host machince is running Debian 12.

How are you running Gitea?

With offical docker image. (Strictly follow the instructions in https://docs.gitea.com/installation/install-with-docker)

Database

SQLite

@lunny
Copy link
Member

lunny commented Dec 12, 2024

Did you migrate a public or a private repository?

@GitEventhandler
Copy link
Author

GitEventhandler commented Dec 12, 2024

Hi, thanks for reply!

Yes this error happens when trying to "migrate" ("import" in version 1.22.x) a public lfs repository. And I initiated a new container instance to test this problem in order to minimize any potential interference. The issue remains reproducible.

Specifically, the mirroring process will proceeds without error when the option "mirror LFS files" is not selected.

@hiifong
Copy link
Member

hiifong commented Dec 12, 2024

I'd like to try to fix this bug

@hiifong
Copy link
Member

hiifong commented Dec 12, 2024

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants