Migrate from Gitlab issue #14354

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

Originally created by @stopkadr on GitHub (Apr 9, 2025).

Description

Hi,
Attempting to migrate a repository from GitLab to Gitea via the UI results in the following error:
json: cannot unmarshal array into Go value of type gitlab.Project

Gitlab versions: 17.9.2-ce, 17.10.4-ce

How to reproduce bug:
New Migration -> Gitlab -> Options:
Migration Options: This repository will be a mirror

Logs:

gitea-1 | 2025/04/09 13:42:52 ...ices/task/migrate.go:60:func1() [E] runMigrateTask[15] by DoerID[1] to RepoID[15] for OwnerID[1] failed: json: cannot unmarshal array into Go value of type gitlab.Project
gitea-1 | 2025/04/09 13:42:52 ...ervices/task/task.go:53:handler() [E] Run task failed: json: cannot unmarshal array into Go value of type gitlab.Project

Gitea Version

1.23.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image

Git Version

No response

Operating System

Docker

How are you running Gitea?

Running from docker and by using https://demo.gitea.com/

Database

MySQL/MariaDB

Originally created by @stopkadr on GitHub (Apr 9, 2025). ### Description Hi, Attempting to migrate a repository from GitLab to Gitea via the UI results in the following error: `json: cannot unmarshal array into Go value of type gitlab.Project` Gitlab versions: 17.9.2-ce, 17.10.4-ce How to reproduce bug: New Migration -> Gitlab -> Options: Migration Options: This repository will be a mirror Logs: > gitea-1 | 2025/04/09 13:42:52 ...ices/task/migrate.go:60:func1() [E] runMigrateTask[15] by DoerID[1] to RepoID[15] for OwnerID[1] failed: json: cannot unmarshal array into Go value of type gitlab.Project > gitea-1 | 2025/04/09 13:42:52 ...ervices/task/task.go:53:handler() [E] Run task failed: json: cannot unmarshal array into Go value of type gitlab.Project ### Gitea Version 1.23.7 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots ![Image](https://github.com/user-attachments/assets/74eac07d-729d-46c3-8353-dd1a1562a9f1) ### Git Version _No response_ ### Operating System Docker ### How are you running Gitea? Running from docker and by using https://demo.gitea.com/ ### Database MySQL/MariaDB
GiteaMirror added the topic/repo-migrationtype/bug labels 2025-11-02 11:10:41 -06:00
Author
Owner

@TheFox0x7 commented on GitHub (Apr 9, 2025):

Do you have a more concrete example to reproduce this on? It could help with investigation.

@TheFox0x7 commented on GitHub (Apr 9, 2025): Do you have a more concrete example to reproduce this on? It could help with investigation.
Author
Owner

@stopkadr commented on GitHub (Apr 10, 2025):

@TheFox0x7 , thank you for your question. I made a screen recording of the migration attempt.

Gitea URL: https://demo.gitea.com
Gitlab URL: https://gitlab.com

The same bug is reproducible when attempting a repository migration from self-hosted GitLab to self-hosted Gitea.

Image

@stopkadr commented on GitHub (Apr 10, 2025): @TheFox0x7 , thank you for your question. I made a screen recording of the migration attempt. Gitea URL: https://demo.gitea.com Gitlab URL: https://gitlab.com The same bug is reproducible when attempting a repository migration from self-hosted GitLab to self-hosted Gitea. ![Image](https://github.com/user-attachments/assets/f99279d9-4fa9-48b9-a102-ef6ac438a8f8)
Author
Owner

@TheFox0x7 commented on GitHub (Apr 10, 2025):

Thank you very much for the screen recording! It's very helpful in narrowing it down.

You have to pass full repository url to the migration system - for your screen recording it would be https://gitlab.com/olegkrv/test-project3.

Gitea could reject your migration attempt earlier with a more clear fault so there's room for improvement there.

@TheFox0x7 commented on GitHub (Apr 10, 2025): Thank you very much for the screen recording! It's very helpful in narrowing it down. You have to pass full repository url to the migration system - for your screen recording it would be `https://gitlab.com/olegkrv/test-project3`. Gitea could reject your migration attempt earlier with a more clear fault so there's room for improvement there.
Author
Owner

@stopkadr commented on GitHub (Apr 10, 2025):

@TheFox0x7, thank you for your clarification. I thought this feature would migrate all repositories accessible with the provided token. With passing full repository url it's works as expected. So I've come to the conclusion that there is no actual migration bug.

@stopkadr commented on GitHub (Apr 10, 2025): @TheFox0x7, thank you for your clarification. I thought this feature would migrate all repositories accessible with the provided token. With passing full repository url it's works as expected. So I've come to the conclusion that there is no actual migration bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14354