I want to have a local mirror/proxy for some repos I’m using.
The idea is having something I can point my reads to so that I’m free to migrate my upstream repositories whenever I want and also so that my stuff doesn’t stop working if some of the jankiest third-party repos I use disappears.
I know the various forjego/gitea/gitlab/… (well, at least some of them - I didn’t check the specifics) have pull mirroring, but I’m looking for something simpler… ideally something with a single config file where I list what to mirror and how often to update and which then allows anonymous read access over the network.
Does anything come to mind?
git
git-sync looks like it does at you’re looking for.
git is already a decentralized version control software. Your local git repos are mirrors by themselves.
Put some
git fetch
in a server crontab, and you’re done. You can access them via ssh if your user have permissions.A bash script would probably be easiest to write and pluck into cron.
Edit: Clone all repos you want into one directory and then loop with a script over all cloned dirs and issue
git fetch
. Done. If you want to add a repo you clone another.