Created
October 27, 2015 15:49
-
-
Save rus-mihai/427b20c7f2d946959e72 to your computer and use it in GitHub Desktop.
clone all repos from a user from bitbucket while logging in with ssh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Usage: getAllRepos.sh [username] [userwithrepos] | |
curl -u ${1} https://api.bitbucket.org/1.0/users/${2} > repoinfo | |
for repo_name in `grep -o \"slug[^,]*\" repoinfo | cut -f2 -d: | sed 's/\"//g'` | |
do | |
echo $repo_name | |
git clone ssh://[email protected]/${2}/$repo_name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment