Skip to content

Instantly share code, notes, and snippets.

@sebabelmar
Created January 15, 2018 21:50
Show Gist options
  • Save sebabelmar/b65422a587546805c5bebf476b70790f to your computer and use it in GitHub Desktop.
Save sebabelmar/b65422a587546805c5bebf476b70790f to your computer and use it in GitHub Desktop.
Script to download repos
Generic script:
for i in `curl -u [GH_USERNAME:GH_TOKEN] -s "https://api.github.com/orgs/[COHORT_NAME]/repos…[page number start with 1]" |grep ssh_url | cut -d ':' -f 2-3|tr -d '",'`; do git clone $i; done
Example for 2 pages:
for i in `curl -u sebabelmar:456banana7845678 -s "https://api.github.com/orgs/fence-lizards-2014/repos…" |grep ssh_url | cut -d ':' -f 2-3|tr -d '",'`; do git clone $i; done
for i in `curl -u sebabelmar:456banana7845678 -s "https://api.github.com/orgs/fence-lizard-2014/repos…" |grep ssh_url | cut -d ':' -f 2-3|tr -d '",'`; do git clone $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment