Skip to content

Instantly share code, notes, and snippets.

@BigAl
Created August 27, 2024 10:41
Show Gist options
  • Save BigAl/1eac311402ae11247c047d3d2cc571f0 to your computer and use it in GitHub Desktop.
Save BigAl/1eac311402ae11247c047d3d2cc571f0 to your computer and use it in GitHub Desktop.
Clone all GitHub repositories in an organization
GitHub Personal Access Token that you can get from https://github.com/settings/tokens (click on “generate a new one” and check all the “repo” and “user” permission scopes)
curl -s -H "Authorization: token $TOKEN" "https://api.github.com/orgs/$ORG/repos?per_page=100&page=1" | jq -r ".[].ssh_url" | xargs -n 1 git clone
Githun API limits to 100 repos increment page to get the second hundred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment