ghq icon indicating copy to clipboard operation
ghq copied to clipboard

Feature request: Optional wait between invokations of git

Open carlsmedstad opened this issue 2 years ago • 0 comments

Hey,

Many sites hosting git repositories have some kind of DOS protection that will reset the connection if to many request are sent in a short amount of time. This makes it hard to update many repositories at once as one will face the following error:

$ ghq get -u *
...
       git submodule update --init --recursive
    update /home/carsme/ghq/github.com/cmake-lint/cmake-lint
       git pull --ff-only
kex_exchange_identification: read: Connection reset by peer
Connection reset by 140.82.121.3 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
     error failed to get "cmake-lint/cmake-lint": /bin/git: exit status 1

One solution to this would be to add a --sleep flag to the get command that would allow the user to specify a number of seconds to sleep between updates of repositories.

Thanks!

carlsmedstad avatar Apr 18 '22 19:04 carlsmedstad