Last active
August 17, 2022 11:21
-
-
Save RicardoRagel/08351112b84bb3fd907fc41aad9a3098 to your computer and use it in GitHub Desktop.
Simple script to clone all the repositories of a Github Organization
This file contains 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
# Before execute this script, please make sure: | |
# - You have a Personal Access Token with, at least, read:org permissions | |
# - You have the module gh installed: $ sudo snap install gh | |
# - You have already logged into gh using: $ gh auth login | |
# Note: select HTTPS or change the proper script command | |
# - Modify <CHANGE_ME> to your organization name as it's shown in Github | |
MY_ORG_NAME=<CHANGE_ME> | |
gh repo list ${MY_ORG_NAME} --limit 1000 | while read -r repo _; do | |
#gh repo clone "$repo" "$repo" | |
git clone "https://github.com/$repo" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment