Skip to content

Instantly share code, notes, and snippets.

@braincow
Last active April 4, 2019 07:49
Show Gist options
  • Save braincow/4084f4e3639bd98a2cb33c053949467c to your computer and use it in GitHub Desktop.
Save braincow/4084f4e3639bd98a2cb33c053949467c to your computer and use it in GitHub Desktop.
clone all github organizations repositories
#!/bin/sh
#
# install jq, curl and obviously git
#
### configuration
# create your github api access token with repo access rights and place it below
GITHUB_AT=
# set the source organization id/name from github below
GITHUB_ORG=
### command
curl -s https://$GITHUB_AT:@api.github.com/orgs/$GITHUB_ORG/repos?per_page=200 | jq .[].ssh_url | xargs -n 1 git clone
# eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment