idchlife
idchlife

Reputation: 678

How to import 100 gitea self-hosted repositories to Gitlab self-hosted community edition? Default import is broken

I tried importing via default gitlab "import from gitea" and all I got - repositories with only FIRST commit, broken list of repositories from gitea (gitlab for some reason misplaces names of gitea repositories resulting in "name already taken").

Can I somehow export gitea repos into archive and import with 1 file or something? I'm afraid default gitlab import is not working for me, and our gitea server due to be disabled soon (migrating to server with better infrastructure).

Upvotes: 1

Views: 1194

Answers (1)

VonC
VonC

Reputation: 1327384

One possible workaround is, for each Gitea repository:

  • clone it
  • change the remote (git remote set-url origin https://gitlab.com/...) to a new empty GitLab project/repository, which can be done from command line, using API or gitlab-cli
  • git push --mirror

So you can script those steps, and loop over each of your Gitea repository that way.

Upvotes: 2

Related Questions