Skip to content

Instantly share code, notes, and snippets.

@yuanzhaoYZ
Last active July 5, 2017 12:40
Show Gist options
  • Save yuanzhaoYZ/97b6875048d565fbfbd530e6d0962b20 to your computer and use it in GitHub Desktop.
Save yuanzhaoYZ/97b6875048d565fbfbd530e6d0962b20 to your computer and use it in GitHub Desktop.
Clone all git repositories from BitBucket
curl -s  -k https://USERNAME:PASSWORD@api.bitbucket.org/1.0/user/repositories | python -c 'import sys, json, os; r = json.loads(sys.stdin.read()); [os.system("git clone %s" % d["resource_uri"].replace("/1.0/repositories","https://USERNAME:PASSWORD@bitbucket.org")+".git") for d in r]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment