Created
October 9, 2012 04:25
-
Star
(315)
You must be signed in to star a gist -
Fork
(89)
You must be signed in to fork a gist
-
-
Save caniszczyk/3856584 to your computer and use it in GitHub Desktop.
Clone all repos from a GitHub organization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; 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
Here is my
Linux
guide using the GitHub CLIgh
andssh
:🖊️ Install GitHub CLI: https://github.com/cli/cli/blob/trunk/docs/install_linux.md#installing-gh-on-linux-and-bsd
🖊️ Clone all GitHub packages under org name:
gh repo list <ADD ORG NAME> --json=sshUrl --limit 1000 -q ".[].sshUrl" | xargs -n1 git clone
Example that worked for me (for this organization repo: https://github.com/orgs/NREL-Sienna) :
gh repo list NREL-Sienna --json=sshUrl --limit 1000 -q ".[].sshUrl" | xargs -n1 git clone