- Go to: https://github.com/settings/tokens and generate a personal access token. Make sure you write it down because it will disappear afterwards
- In the below code, orgname is the name of your organization, and your_access_token is the token you just generated, you will also need to run it for each page.
CNTX=orgs; NAME=orgname; ACCESS_TOKEN=your_access_token; PAGE=1
curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100&access_token=$ACCESS_TOKEN" |
grep -e 'clone_url*' |
cut -d \" -f 4 |
xargs -L1 git clone
No comments:
Post a Comment