-
-
Save jkarthid/6051ab8d862ba1a940a534ce43e06f37 to your computer and use it in GitHub Desktop.
Bash one-liner script to clone all repos from a Bitbucket team
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
| for repo in $(curl -u {username} --raw https://api.bitbucket.org/1.0/users/{team} | sed -r 's/("name": )/\n\1/g' | sed -r 's/"name": "(.*)"/\1/' | sed -e 's/{//' | cut -f1 -d\" | tr '\n' ' '); do git clone git@bitbucket.org:{team}/$repo.git; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment