Created
January 4, 2016 17:46
-
-
Save rauluranga/209516f3ddac9a84e170 to your computer and use it in GitHub Desktop.
clone all repositories from 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
#!/bin/bash | |
ORG_NAME="YOUR_ORGANIZATIONS_NAME" | |
ACCESS_TOKEN="YOUR_ACCESS_TOKEN" | |
GITHUB_INSTANCE="api.github.com" | |
URL="https://${GITHUB_INSTANCE}/orgs/${ORG_NAME}/repos?access_token=${ACCESS_TOKEN}" | |
curl ${URL} | 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