Skip to content

Instantly share code, notes, and snippets.

@wellsie
Created June 7, 2016 21:13
Show Gist options
  • Save wellsie/300de287d5e3257f53cb9cc0203ecbb0 to your computer and use it in GitHub Desktop.
Save wellsie/300de287d5e3257f53cb9cc0203ecbb0 to your computer and use it in GitHub Desktop.
clone all organization github repos
#/bin/bash -eux
# check for jq
jq --version
ORG="<organization"
USER="<user>"
TOKEN="<token>"
curl -s https://api.github.com/orgs/${ORG}/repos\?per_page\=200 -u ${USER}:${TOKEN} \
| jq '.[].ssh_url' \
| xargs -L1 git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment