Created
May 13, 2024 13:09
-
-
Save butuzov/5764a893399fa09a9ad54d0ae9d863f6 to your computer and use it in GitHub Desktop.
download all repositories from org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s -L \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: Bearer ghp_TOKEN" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
"https://api.github.com/orgs/ORG/repos?per_page=100" \ | |
| jq -r '.[].git_url' \ | |
| grep $pattern | xargs -n1 -I{} -- sh -c 'git clone {} ./repos/$(basename {} .git)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment