Massive migration from disks

hello
I need to migrate many very big git repositories from my git production server to gitea.
One way is to synchronize (rsync) the remote git tree to my new gitea server and (it would be a great feature) launch a command-line on all repository to migrate in gitea.
Is there a command-line way to integrate these repositories ?
(example: gitlab does this with the command “gitlab:import:repos”)

1 Like

I too would like a CLI or API based mechanism to tell gitea about a set of repo’s (I have thousands of repo’s… manually adding each does not scale well). My nearly 9K repo’s (replicated globally to 500K+ repo’s for redundancy/scaling at many geographies) are owned by organizations, under a structure like /git/org/repox.git, so being able to identify org owned vs user owned via the CLI/API would be nice. Perhaps even a “scan” mode to look for new repo’s (eg: at some interval) and add new ones… hey, I figured if we’re asking for ponies and all! :wink:

I will try and peruse the code coming up… finding time is a challenge (as I’m sure it is for you folks). Thanks for any thoughts/info/feature-pointers as well as your time/effort. Cheers!

There is API to migration repository from an git URL. We also have a CLI tool https://github.com/go-gitea/tea, but I think we need a PR to implement a migration.

I will take a look at that API, thanks for replying.

I was facing the same challenge recently. In order to create Gitea repositories programmatically I created a node script that worked quite well:

1 Like

example: gitlab does this with the command “gitlab:import:repos”

我有同样的需求,目前是否有好的方法实现

Two methods are possible currently.

  1. Use a script with Gitea API and git push
  2. Upload your repositories to gitea server via sftp and then use adopt feature on admin panel.