Skip to content

Instantly share code, notes, and snippets.

@wellsie
Created June 7, 2016 21:13
Show Gist options
  • Save wellsie/e286c8ed81189bb2cd6d5d16d9b3d17c to your computer and use it in GitHub Desktop.
Save wellsie/e286c8ed81189bb2cd6d5d16d9b3d17c 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