Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Clone all repos from a GitHub organization
curl -s | ruby -rubygems -e 'require "json"; JSON.load( { |repo| %x[git clone #{repo["ssh_url"]} ]}'

This comment has been minimized.

Copy link
Owner Author

bparker06 commented Jun 20, 2019

Another method that doesn't use ruby:

curl -s | jq -rc '.[] | {clone_url} | .clone_url' | parallel -n 1 git clone {}

It will spawn one clone for every CPU thread you have, and wait until a thread is free before executing another one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.