Last active
July 25, 2024 15:33
-
-
Save dracco1993/245f33cf6286d8ab27d55cb34b40d191 to your computer and use it in GitHub Desktop.
Clone all repos using a personal access token
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 | |
ORG=organization; | |
ACCESS_KEY=0000000000000000000000000000; | |
for i in $(curl -H "Authorization: Bearer $ACCESS_KEY" "https://api.github.com/orgs/$ORG/repos?per_page=1000" | sed '/[ ]*"clone_url":/!d;s/[^:]*: "//;s/",$//'); do | |
echo git clone $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment