Skip to content

Instantly share code, notes, and snippets.

@waxzce
Created September 15, 2012 17:56
Show Gist options
  • Save waxzce/3729070 to your computer and use it in GitHub Desktop.
Save waxzce/3729070 to your computer and use it in GitHub Desktop.
Clone all git repo from a gitolite
#!/bin/bash
# USAGE : git gitolite-clone <user@host>
GITOLITE_URL=$1
GOGO=0
for i in $(ssh $GITOLITE_URL info)
do
if [ $GOGO -eq 1 ] ; then
if [[ $i != "R" && $i != "W" ]] ; then
echo "$i"
git clone $GITOLITE_URL:$i
fi
else
if [[ $i =~ "access:" ]]; then
GOGO=1
fi
fi
# echo " => $i|"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment