wrap cloning the git repo in a loop