parallel
,jq
,curl
GITHUB_TOKEN
your personal github API tokenORG
the name of your organizationREPO_TOTAL
which is the total number of repositories your org owns (checkcurl
below)
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/orgs/$ORG | jq -r '.public_repos + .owned_private_repos'
seq $REPO_TOTAL | parallel -j 8 clone_org.sh $ORG_NAME {#}
Note: scripts clones repositories into current directory under ORG_NAME/REPO_NAME