A simple utility script to clone all of an organization's repositories and branches therein.
Set your personal access token (used for API access) in the GITHUB_TOKEN
environment variable.
npx @lukiffer/clone-org-repos --org "<ORG_NAME>"
npx @lukiffer/clone-org-repos --org "<ORG_NAME>" --target-path "/path/to/destination"
By default, ~/.ssh/id_rsa
will be used. To use a different key, specify the --ssh-key
argument.
npx @lukiffer/clone-org-repos --org "<ORG_NAME>" --ssh-key "/path/to/.ssh/key"
Skip cloning forked repositories using the --exclude-forks
argument.
npx @lukiffer/clone-org-repos --org "<ORG_NAME>" --exclude-forks