Created
July 31, 2015 16:59
-
-
Save stringparser/9cc82834fb8831962c47 to your computer and use it in GitHub Desktop.
Clone all private repos of an organization
This file contains hidden or 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 -u <token>:x-oauth-basic -s https://api.github.com/orgs/<orgName>/repos | node -e ' | |
var repos=""; | |
process.stdin.resume(); | |
process.stdin.setEncoding("utf8"); | |
process.stdin.on("data", function(data){ | |
repos += data; | |
}); | |
process.stdin.on("end", function(){ | |
JSON.parse(repos).forEach(function(repo){ | |
require("child_process").spawn("git", ["clone", repo.html_url], {stdio: "inherit"}); | |
}); | |
}) | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment