Created
November 28, 2019 10:47
-
-
Save hazcod/3e8f7ac1c2b1d9f96f508617218fa8aa to your computer and use it in GitHub Desktop.
Clone all your organization repositories on GitHub.
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
#!/usr/bin/env bash | |
# will ask for your personal access token | |
GH_USER="" | |
GH_ORG="" | |
curl -u "${GH_USERNAME}" -s "https://api.github.com/orgs/${GH_ORG}/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