Created
May 21, 2024 05:02
-
-
Save deekayen/0451fbf72630ff61093a7fb165e647f7 to your computer and use it in GitHub Desktop.
Clone all Github repositories that you have access to
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
#!/bin/bash | |
# Set your GitHub username and token | |
username="your_username" | |
token="your_token" | |
org="your_org" | |
# Get the list of repositories in the organization | |
repos=$(curl -s -u $username:$token https://api.github.com/orgs/$org/repos | jq -r '.[].clone_url') | |
# Clone each repository | |
for repo in $repos | |
do | |
git clone $repo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment