The git mirroring service allows to mirror git repositories into a local server.
All repositories are stored in the DataDir/git/hostname
path. So for github.com it will be: DataDir/git/github.com
.
- Iterate over each hostname
- Start a goroutinne for each hostname
- Iterate over folder ending by
.git
(up to 3 nested levels) - Run the
fetch
andupdate-server-info
commands on each mirror
The current implementation provides support for the smart http protocol, so it is possible to only clone over http/https.
git clone https://mirror.example.com/git/github.com/rande/pkgmirror.git
You can also download a zip for a specific version:
curl https://mirror.example.com/git/github.com/rande/pkgmirror/master.git
curl https://mirror.example.com/git/github.com/rande/pkgmirror/9c34490d5fb421d45bb8634b84308995b407fb4b.git
Please note, only semver tags and commits are cached.