Skip to content

Instantly share code, notes, and snippets.

@michaelcontento
Created January 7, 2014 16:49
Show Gist options
  • Save michaelcontento/8302289 to your computer and use it in GitHub Desktop.
Save michaelcontento/8302289 to your computer and use it in GitHub Desktop.
clone all github and bitbucket repositories
curl --user 'USER:PASS' -s https://bitbucket.org/api/2.0/repositories/michaelcontento | ruby -rjson -e 'JSON.load(STDIN.read)["values"].each {|repo| %x[git clone #{repo["links"]["clone"][1]["href"]} ]}'
curl -s https://api.github.com/users/michaelcontento/repos | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment