Skip to content

Instantly share code, notes, and snippets.

@rauluranga
Created January 4, 2016 17:46
Show Gist options
  • Save rauluranga/209516f3ddac9a84e170 to your computer and use it in GitHub Desktop.
Save rauluranga/209516f3ddac9a84e170 to your computer and use it in GitHub Desktop.
clone all repositories from organization
#!/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