Migration from self hosted gitlab does not work with project name in URL #6198

Open
opened 2025-11-02 06:48:04 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @pboguslawski on GitHub (Oct 22, 2020).

Migration from self hosted gitlab-ce (checked many different versions with api v4: 9.x, 10.x, 11.x, 12.x and finally 13.3.7) to gitea v1.13 does not work if source repository URL contains project namespace + name like

https://my.gitlab.domain/me/myproject.git
https://my.gitlab.domain/me/myproject

Gitea throws error:

modules/task/task.go:51:handle() [E] Run task failed: GET https://my.gitlab.domain/api/v4/projects/me/myproject: 404 failed to parse unknown error format

Opening this URL in web browser returns

{"error":"404 Not Found"}

URL-s that work in web browser:

Tested that migration from such gitlab to gitea works when source URL is specified with repo ID not name like this:

https://my.gitlab.domain/10

Please verify and fix or (if using ID is required) update instruction in UI for users to know what to enter as URL.

Originally created by @pboguslawski on GitHub (Oct 22, 2020). Migration from self hosted gitlab-ce (checked many different versions with api v4: 9.x, 10.x, 11.x, 12.x and finally 13.3.7) to gitea v1.13 does not work if source repository URL contains project namespace + name like https://my.gitlab.domain/me/myproject.git https://my.gitlab.domain/me/myproject Gitea throws error: > modules/task/task.go:51:handle() [E] Run task failed: GET https://my.gitlab.domain/api/v4/projects/me/myproject: 404 failed to parse unknown error format Opening this URL in web browser returns > {"error":"404 Not Found"} URL-s that work in web browser: - list of repos: https://my.gitlab.domain/api/v4/projects - repo id=10 details: https://my.gitlab.domain/api/v4/projects/10 Tested that migration from such gitlab to gitea works when source URL is specified with repo ID not name like this: https://my.gitlab.domain/10 Please verify and fix or (if using ID is required) update instruction in UI for users to know what to enter as URL.
GiteaMirror added the topic/repo-migration label 2025-11-02 06:48:04 -06:00
Author
Owner

@c-4-m commented on GitHub (Nov 11, 2020):

I'm also having problems with mirroring from a self-hosted gitLab instance. However using the ID does not work for me. Have you tested the ID method with private repos?

@c-4-m commented on GitHub (Nov 11, 2020): I'm also having problems with mirroring from a self-hosted gitLab instance. However using the ID does not work for me. Have you tested the ID method with private repos?
Author
Owner

@pboguslawski commented on GitHub (Nov 12, 2020):

Have you tested the ID method with private repos?

As far as I remember there were internal repos also (limited access for logged in users with repo permissions assigned) but all were from "organization" namespaces (which user had permissions to) not user private namespace. Unfortunatelly no source gitlab available to test it.

@pboguslawski commented on GitHub (Nov 12, 2020): > Have you tested the ID method with private repos? As far as I remember there were internal repos also (limited access for logged in users with repo permissions assigned) but all were from "organization" namespaces (which user had permissions to) not user private namespace. Unfortunatelly no source gitlab available to test it.
Author
Owner

@6543 commented on GitHub (Nov 14, 2020):

I tested a gitlab migration and it worked on my side ... (v1.14.0-dev 7d2700c8be)

@6543 commented on GitHub (Nov 14, 2020): I tested a gitlab migration and it worked on my side ... (v1.14.0-dev 7d2700c8be5da8f2073a576dae209ae07ac6ed22)
Author
Owner

@6543 commented on GitHub (Nov 23, 2020):

same issue happend here: https://github.com/go-gitea/gitea/pull/13646#issuecomment-731973386

I think in this case it's not gitea's fault, since the migrator relay on a working api on the gitlab side ...

@6543 commented on GitHub (Nov 23, 2020): same issue happend here: https://github.com/go-gitea/gitea/pull/13646#issuecomment-731973386 I think in this case it's not gitea's fault, since the migrator relay on a working api on the gitlab side ...
Author
Owner

@rekcah1986 commented on GitHub (Aug 6, 2021):

image
image

@rekcah1986 commented on GitHub (Aug 6, 2021): ![image](https://user-images.githubusercontent.com/3055444/128506990-297b2506-3167-457b-84a3-dd10ca69f0ad.png) ![image](https://user-images.githubusercontent.com/3055444/128507109-19517979-fa28-44be-a6be-167454a86dcc.png)
Author
Owner

@lennyluosz commented on GitHub (Aug 29, 2024):

after 4 years, the issue is still there when I am using Gitlab CE v17.3 . Also, I checked gitlab API document as following https://docs.gitlab.com/ee/api/projects.html#get-single-project
it seems that Gitlab don't have api like https://gitlab.server.domain/api/v4/projects/group-name/project-name , and it has only api like https://gitlab.server.domain/api/v4/projects/:id

@lennyluosz commented on GitHub (Aug 29, 2024): after 4 years, the issue is still there when I am using Gitlab CE v17.3 . Also, I checked gitlab API document as following https://docs.gitlab.com/ee/api/projects.html#get-single-project it seems that Gitlab don't have api like https://gitlab.server.domain/api/v4/projects/group-name/project-name , and it has only api like https://gitlab.server.domain/api/v4/projects/:id
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6198