Created
April 22, 2024 17:22
-
-
Save ohrafaelmartins/5f0a3706a8ad2b464c511d7b416d22db to your computer and use it in GitHub Desktop.
To clone every repository in your organization, you can use a simple script or command-line tool. Here's a step-by-step guide to achieving this using the GitHub API and some scripting:
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 | |
# To clone every repository in your organization, you can use a simple script or command-line tool. | |
# Here's a step-by-step guide to achieving this using the GitHub API and some scripting: | |
# Set your GitHub username and Personal Access Token | |
USERNAME="USERNAME" | |
TOKEN="TOKEN" | |
# Replace with your organization name | |
ORG="ORG" | |
REPOS=$(curl -s "https://api.github.com/orgs/$ORG/repos" | jq -r '.[].ssh_url') | |
# Clone each repository using SSH | |
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