Import project bug

Problem to solve

I need migrate project from one gitlab instance to another.
But I have validation error in import step.

I think it can be bug in gitlab.

Steps to reproduce

  1. In gitlab-A I start export with success and wait until export file package is created.
  2. After this I send request to gitlab-B for import file. Beacause file is to large and request is reject I use endpoint gitlab-B.tld/projects/remote-import.
  3. For url to import I use direct link to download from gitlab-A eg. gitlab-A.example.com/api/v4/projects/5/export/download?private_token=xxxxxx.
  4. But import endpoint have validation of Content-type header and return HTTP 400 with message: Content type 'application/octet-stream' not allowed. (Allowed: application/gzip, application/x-tar, application/x-gzip)
  5. I check this by curl and I see Gitlab-A return wrong Content type for exported package file.

Versions

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Versions

  • GitLab A - 17.1.8-ee
  • Gitlab B - 17.4.2-33

URL to import is the URL from the Gitlab B instance and the appropriate group/project, not the exported file for download. So:

https://gitlab.example.com/group/projectA

It’s misunderstanding.
I was sent request import to gitlab-B with url https://gitlab-b.example.com/api/v4/projects/remote-import and pass url from point 3 to exported file in body of request.