Skip to content

Instantly share code, notes, and snippets.

@deekayen
Created May 21, 2024 05:02
Show Gist options
  • Save deekayen/0451fbf72630ff61093a7fb165e647f7 to your computer and use it in GitHub Desktop.
Save deekayen/0451fbf72630ff61093a7fb165e647f7 to your computer and use it in GitHub Desktop.
Clone all Github repositories that you have access to
#!/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