Skip to content

Instantly share code, notes, and snippets.

@fjlopezs
Created May 18, 2018 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fjlopezs/ab31b32647e92966c314d088dd9f5540 to your computer and use it in GitHub Desktop.
Save fjlopezs/ab31b32647e92966c314d088dd9f5540 to your computer and use it in GitHub Desktop.
Download All repisotories from your Organization
# Require jq, git, curl, private key and personal token
GITHUB_TOKEN=YOUR_PRIVATE_TOKEN see: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
ORGANIZATION=YOUR_ORGANIZATION_NAME
curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/orgs/$ORGANIZATION/repos\?per_page\=500 | jq -r '.[].ssh_url' | xargs -n 1 git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment