Last active
October 20, 2021 11:45
-
-
Save dgmike/94f6a48db2855413a89d2ecbb1051246 to your computer and use it in GitHub Desktop.
Clone all repos from github
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 CNTX=users and NAME=yourusername, to download all your repositories. | |
# Set CNTX=orgs and NAME=yourorgname, to download all repositories of your organization. | |
CNTX={users|orgs} NAME={username|orgname} PAGE=1 \ | |
curl -s "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" | | |
jq -r '.[]|.ssh_url' | | |
xargs -L1 -n1 -t git clone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment