@kenanhancer/

GitClone

bash

No description

fork
loading
Files
  • main.sh
  • githubApi.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.4093076640966795","path":"main.sh","file":{"path":"main.sh","content":{"asEncoding":{"base64":"Y3VybCBodHRwczovL2FwaS5naXRodWIuY29tLwoKIyB1c2VyX3JlcG9zaXRvcmllc191cmwKIyBodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL3t1c2VyfS9yZXBvc3s/dHlwZSxwYWdlLHBlcl9wYWdlLHNvcnR9CmN1cmwgaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS91c2Vycy9rZW5hbmhhbmNlci9yZXBvcz9wZXJfcGFnZT0yIHwgZ3JlcCBjbG9uZV91cmwgfCBhd2sgLUYgJyInICd7cHJpbnQgJDR9JyB8IHhhcmdzIC1uIDEgLVAgNCBnaXQgY2xvbmUKCiMgb3JnYW5pemF0aW9uX3VybAojIGh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vb3Jncy97b3JnfQojIHJlcGxhY2Uge29yZ30gd2l0aCB5b3VyIG9yZ2FuaXphdGlvbiBuYW1lCiMgY3VybCBodHRwczovL2FwaS5naXRodWIuY29tL29yZ3Mve29yZ30vcmVwb3MKCiNJZiB5b3UgbmVlZCBhdXRoZW50aWNhdGlvbiwgdXNlIHRoZSBmb2xsb3dpbmcgc3ludGF4CiNyZXBsYWNlIHthY2Nlc3MtdG9rZW59IHdpdGggeW91ciBnaXRodWIgYWNjZXNzIHRva2VuCiNjdXJsIC11IHthY2Nlc3MtdG9rZW59Ongtb2F1dGgtYmFzaWMgaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS91c2Vycy9rZW5hbmhhbmNlci9yZXBvcz9wZXJfcGFnZT0yCgojR2l0IENsb25lCgojY3VybCAtdSB7YWNjZXNzLXRva2VufTp4LW9hdXRoLWJhc2ljIC1zICJodHRwczovL2FwaS5naXRodWIuY29tL29yZ3Mve29yZ2FuaXphdGlvbi1uYW1lf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YmFzaWMgLXMgaHR0cHM6Ly9hcGkuZ2l0aHViLmNvbS9vcmdzL29yZ2FuaXphdGlvbi1uYW1lL3JlcG9zP3Blcl9wYWdlPTEwMCB8IGpxICIuW10uc3NoX3VybCIgfCB4YXJncyAtbiAxIGdpdCBjbG9uZSAtLXJlY3Vyc2l2ZQ=="},"asBuffer":null},"loaded":true}}
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