Skip to content

Instantly share code, notes, and snippets.

@jkarthid
Forked from brunosaboia/clone_all_bitbucket.sh
Created December 20, 2018 09:17
Show Gist options
  • Select an option

  • Save jkarthid/6051ab8d862ba1a940a534ce43e06f37 to your computer and use it in GitHub Desktop.

Select an option

Save jkarthid/6051ab8d862ba1a940a534ce43e06f37 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