loading
open in
main.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
curl https://api.github.com/

# user_repositories_url
# https://api.github.com/users/{user}/repos{?type,page,per_page,sort}
curl https://api.github.com/users/kenanhancer/repos?per_page=2 | grep clone_url | awk -F '"' '{print $4}' | xargs -n 1 -P 4 git clone

# organization_url
# https://api.github.com/orgs/{org}
# replace {org} with your organization name
# curl https://api.github.com/orgs/{org}/repos

#If you need authentication, use the following syntax
#replace {access-token} with your github access token
#curl -u {access-token}:x-oauth-basic https://api.github.com/users/kenanhancer/repos?per_page=2

#Git Clone

#curl -u {access-token}:x-oauth-basic -s "https://api.github.com/orgs/{organization-name}/repos?per_page=100" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["ssh_url"]} ]}'


#curl -u {access-token}:x-oauth-basic -s https://api.github.com/orgs/organization-name/repos?per_page=100  | perl -ne 'print "$1\n" if (/"ssh_url": "([^"]+)/)' | xargs -n 1 git clone


#curl -u {access-token}:x-oauth-basic -s https://api.github.com/orgs/organization-name/repos?per_page=100 | python -c $'import json, sys, os\nfor repo in json.load(sys.stdin): os.system("git clone " + repo["ssh_url"])'


#curl -u {access-token}:x-oauth-basic -s https://api.github.com/orgs/organization-name/repos?per_page=100 | grep clone_url | awk -F '"' '{print $4}' | xargs -n 1 -P 4 git clone

#Before running the following command, run brew install jq
#curl -u {access-token}:x-oauth-basic -s https://api.github.com/orgs/organization-name/repos?per_page=100 | jq ".[].ssh_url" | xargs -n 1 git clone --recursive