There are github issues about mirroring from github and gitlab etc into gitea, but I’ve not yet seen anyone talk about automated mirroring of one gitea instance to another.
My personal use case is mirroring my main remote gitea instance repos to repos running on my home server. So far I’ve been setting up a mirror on the my home server manually for each new repo I create on the remote. But that’s tedious…and I’ve gotten a bit behind.
It looks like most of the required features already exist in the gitea API. Has anyone done this via script or whatever?
Yup, automated mirror is possible. I have a script that does a one-off mirror from GitHub to Gitea, but could be updated to do Gitea->Gitea, and maybe if you run it on a cron then it will pick up new repos that haven’t been mirrored yet.
Since it’s already written in go I’d assumed using Cobra (for cli) and Viper (for config files) would be doable. May be beyond my current talents/time availability though. Warp seems unnecessary?
The advantage of Warp is language agnosticism. The necessity depends on the language of greatest comfort (e.g. Node or bash wrappers, if desired). If you’re a purist the spf13 tools make the most sense. But there are options.