Skip to content

LFS mirroring fails with some target site #32803

Closed
@GitEventhandler

Description

@GitEventhandler

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions