Migration of gitlab repository fails with error 404 Not Found #8558

Open
opened 2025-11-02 08:10:46 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @karthanistyr on GitHub (Feb 13, 2022).

Gitea Version

1.16.1

Git Version

2.30.2

Operating System

Docker image

How are you running Gitea?

Docker image: gitea/gitea:1.16.1

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

Tried to do a backup migration of the recently released CAD files for the steam deck: https://gitlab.steamos.cloud/SteamDeck/hardware

Pressed the + menu => New Migration
Selected "GitLab"

The failure is the same if I check the "is mirror" option (that I want) or not.

Error in log:

2022/02/13 23:05:53 ...ervices/task/task.go:56:handle() [E] Run task failed: GET https://gitlab.steamos.cloud/api/v4/projects/SteamDeck/hardware: 404 {error: 404 Not Found}

Screenshots

No response

Originally created by @karthanistyr on GitHub (Feb 13, 2022). ### Gitea Version 1.16.1 ### Git Version 2.30.2 ### Operating System Docker image ### How are you running Gitea? Docker image: gitea/gitea:1.16.1 ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description Tried to do a backup migration of the recently released CAD files for the steam deck: https://gitlab.steamos.cloud/SteamDeck/hardware Pressed the `+` menu => New Migration Selected "GitLab" The failure is the same if I check the "is mirror" option (that I want) or not. Error in log: ``` 2022/02/13 23:05:53 ...ervices/task/task.go:56:handle() [E] Run task failed: GET https://gitlab.steamos.cloud/api/v4/projects/SteamDeck/hardware: 404 {error: 404 Not Found} ``` ### Screenshots _No response_
GiteaMirror added the type/bug label 2025-11-02 08:10:46 -06:00
Author
Owner

@mpieters commented on GitHub (Apr 5, 2022):

Same issue here, Gitlab use project IDs instead of project names; like so:

https://gitlab.example.com/api/v4/projects/123

For some reason Gitea assumes the projectname (taken from the clone url (?))

@mpieters commented on GitHub (Apr 5, 2022): Same issue here, Gitlab use project IDs instead of project names; like so: ```https://gitlab.example.com/api/v4/projects/123``` For some reason Gitea assumes the projectname (taken from the clone url (?))
Author
Owner

@hellorayza commented on GitHub (Jan 14, 2023):

I had a similar problem. Maybe you need new token, though old token still validity and work well in repo sync .

@hellorayza commented on GitHub (Jan 14, 2023): I had a similar problem. Maybe you need new token, though old token still validity and work well in repo sync .
Author
Owner

@systemofapwne commented on GitHub (Aug 3, 2023):

About 3 years ago, I successfully created a mirror-clone in gitea towards gitlab. That mirror one still works with the old token.

Today, I wanted to create a new mirror to the very same repo via a new token. The initialization fails with a 404 error. 404 failed to parse unknown error format:

Nevermind: Ticking the read_api checkbox on our gitlab instance fixed it. It was just a permission misconfiguration on the user-side.
For everything to clone, enabling the following permissions for the gitlab token was required:

  • read_api
  • read_repository
  • (write_repository)
@systemofapwne commented on GitHub (Aug 3, 2023): About 3 years ago, I successfully created a mirror-clone in gitea towards gitlab. That mirror one still works with the old token. <del>Today, I wanted to create a new mirror to the very same repo via a new token. The initialization fails with a 404 error. ```404 failed to parse unknown error format:```</del> Nevermind: Ticking the ``read_api`` checkbox on our gitlab instance fixed it. It was just a permission misconfiguration on the user-side. For everything to clone, enabling the following permissions for the gitlab token was required: - read_api - read_repository - (write_repository)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8558