Created
December 14, 2015 15:27
-
-
Save sohayb/5410f03f0a2d95f4cfb2 to your computer and use it in GitHub Desktop.
Clone all git repos from bitbucket. It can be modified easily to clone mercurial repos
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
#!/bin/bash | |
#Script to get all repositories under a user from bitbucket | |
#Usage: getAllRepos.sh [username] [password] | |
curl --user ${1}:${2} https://api.bitbucket.org/1.0/users/${1} > repoinfo | |
for repo_name in `grep \"name\" repoinfo | cut -f4 -d\"` | |
do | |
git clone https://${1}@bitbucket.org/${1}/$repo_name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment