1234567891011121314 |
- #!/bin/bash
- CNTX={users|orgs}; NAME={username|orgname}; PAGE=1
- curl "https://api.github.com/$CNTX/$NAME/repos?page=$PAGE&per_page=100" |
- grep -e 'git_url*' |
- cut -d \" -f 4 |
- xargs -L1 git clone
-
- Note: Set CNTX=users and NAME=yourusername, to download all your repositories. Set CNTX=orgs and NAME=yourorgname,
- to download all repositories of your organization. The maximum page-size is 100, so you have to call this several
- times with the right page number to get all your repositories (set PAGE to the desired page number you want to download).
-
- URL: https://stackoverflow.com/questions/19576742/how-to-clone-all-repos-at-once-from-github#32833411
-
|