Re: Any tools to maintain local mirror of salsa.d.o/med?
On 01.10.19 11:01, Mattia Rizzolo wrote:
On Mon, Sep 30, 2019 at 06:52:35PM +0200, Steffen Möller wrote:
Now, from what I understand, you are already maintaining
some local mirror. How did you do that?
Just sharing some tools that could help with this:
- myrepos → https://myrepos.branchable.com/
- salsa (from devscripts).
In particular, the latter one is written from scratch to integrate with
our gitlab, so you can do stuff like
$ salsa --group med-team checkout --all
and it will checkout all med-team repositories :)
See salsa(1) for more details, including its configuration file(s).
This was indeed where I looked but I should have read your email
instead. Thank you for your poiner to the salsa script. This looks very
much like what I was looking for. What I have come up with is
(for i in $(seq 1 6); do curl
"https://salsa.debian.org/api/v4/groups/?per_page=1000&page=$i"; done) >
curl "https://salsa.debian.org/api/v4/groups/2799" > salsa_group_2799.json
for url in $(jq '.' salsa_group_2799.json | grep ssh_url_to_repo | cut
-f4 -d'"'); do echo $url; git clone $url ; done
This seems to do the job, although I should have invested a bit more
into acquainting myself with the mighty jq tool.