Grab all repository using Google repo
First you need the repo binary.
mkdir -p ~/.local/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.local/bin/repo
chmod a+x ~/.local/bin/repo
or
yay -S extra/repo
mkdir -pv ~/dev/repo && cd ~/dev/repo
repo init -u ssh://git@github.com/Mizux/all.git
repo init -u https://github.com/Mizux/all.git
note: To change/set your user.name and user.email simply use the option --config-name
repo start --all main
repo sync -j8
Now all is done ...
You can easily run a command on each repo e.g.:
repo forall -c 'echo "$REPO_PROJECT:"; git checkout main'
On macOS you may have the following error :
Downloading Repo source from https://gerrit.googlesource.com/git-repo
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
workaround : you need to install python certificat...
# Check you python version
$ python3 --version
Python 3.11.0
# Install the certificates using the provided script
$ cd /Applications/Python\ 3.11
$ ./Install\ Certificates.command