Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@brunosaboia
Created January 5, 2018 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brunosaboia/ecd99f816f24c9b236a6a2b4c14bdf7c to your computer and use it in GitHub Desktop.
Save brunosaboia/ecd99f816f24c9b236a6a2b4c14bdf7c to your computer and use it in GitHub Desktop.
Bash one-liner script to clone all repos from a Bitbucket team
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