Migrating Repository Folder

I’m gonna make this short, because the whole story is too cumbersome to tell.

  1. I migrated Gitea data, including database and Git repositories, onto a fresh Gitea instance installed via Helm on Kubernetes.
  2. Everything works.
  3. Changed ROOT for gitea-repositories in app.ini.
  4. Yes, it is absolutely correct. I checked it 20 times and corrected some mistakes in the process. It is absolutely correct.
  5. All repositories are “unadopted”, i.e. orphaned. I can successfully adopt them in the Web UI.
  6. I don’t wanna adopt hundreds of repositories, each one by hand via a Web UI.

I need some curl, to automatically adopt all orphaned repositories in the gitea-repositories folder. As everything is configured correctly, they are all found fine and adoption works fine.
So, I just need a mass adoption feature.

I don’t want to use the Gitea binary. It’s a Kubernetes installation and I don’t even know, if I can run a Gitea binary side by side, while one is already running. Too much of a hassle to go into this bad approach.

Need a curl, which I can loop for mass adopting all orphaned repositories.

A great bonus would be, to stop making the repositories “updated” in the Web UI, just because I adopted them. It would be better, if they would show the last actual date, that they were touched. Adopting an untouched repository is in my view no “update” to the repository, whatsoever.

Thank you for any constructive feedback!