Is there a way to limit git throughput during a huge "repo clone"?
I want to clone various large GIT repositories (e.g. Linux or Android kernel), but since they are huge (I know I can limit the size with --depth
, but that's not an idea) I will fully use my home bandwidth (450 kbps / c) for several days.
I tried the tool trickle
and even if it works well with the example wget
it doesn't work for git clone
.
How do you limit the GIT clone command group?
Thank!
source to share
I would think you want to trickle
affect the underlying command ssh
used git
(assuming ssh is the underlying protocol for the url), so something like this might work (untested - replace applicable values ββfor your environment):
$ (echo '#!/bin/sh'; echo 'trickle -s -d 100 -u 100 ssh "$@"') > $HOME/bin/trickle-ssh.sh
$ chmod a+rx $HOME/bin/trickle-ssh.sh
$ export GIT_SSH=$HOME/bin/trickle-ssh.sh
$ git clone ...
source to share