Created
February 3, 2021 02:45
-
-
Save finesse-fingers/aff8a21e60b8c40efadc02b1c7c6c0c8 to your computer and use it in GitHub Desktop.
A script to clone all repos in a github organisation
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
#!/bin/bash | |
# Substitute variables here | |
ORG_NAME="<ORG_NAME>" | |
GITHUB_INSTANCE="<GITHUB_INSTANCE>" | |
URL="https://${GITHUB_INSTANCE}/api/v3/orgs/${ORG_NAME}/repos" | |
curl ${URL} | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["clone_url"]} ]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment