Migrate to gitea and keep old repository paths working

Currently my users are accessing our bare git repositories using git+ssh://git@example.com/path/to/repository.git

After we migrate to Gitea the path would be simply git+ssh://git@example.com/my-organization/repository.git

I’d like to keep the old paths working, at least read-only. We have submodules in our repository which contain the same URL, so if the old URLs stop working we won’t be able to check out old versions.

Is there a way I can map /path/to/repository.git to my-organization/repository.git? Even a symlink in the file system? Or at least keep the old path as valid and read-only.

The only other solution I see is to use a different username for the new system eg gitea@example.com, so that the old paths can keep working.

There is no way to do that in Gitea, but it could easily be added to the code, e.g. here: gitea/cmd/serv.go at 34633d85f18ff77643302302379078128dd4ddb7 · go-gitea/gitea · GitHub

I understand that you might not want to maintain your own fork of Gitea however.

Thanks for the tip. With this I could easily remap /path/to/repository to my-organization/ which would be perfect. I’ll think about this versus just forcing everyone to migrate.