Skip to content
This repository was archived by the owner on Dec 31, 2021. It is now read-only.

Commit 1c5be84

Browse files
author
Christian Trabold
committed
scripts: add helper script to clone multiple repos
comes in handy when joining a new project
1 parent 86ceb1e commit 1c5be84

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

scripts/clone-all-repos.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
#
3+
# Public Repos
4+
#
5+
# curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
6+
#
7+
# Private Repos
8+
#
9+
# curl -u [[USERNAME]] -s https://api.github.com/orgs/[[ORGANIZATION]]/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
10+
set -eu
11+
12+
GITHUB_USERNAME="christian-trabold"
13+
GITHUB_TOKEN="token"
14+
GITHUB_ORGANIZATION=""
15+
16+
curl -u $GITHUB_USERNAME:$GITHUB_TOKEN -s https://api.github.com/orgs/${GITHUB_ORGANIZATION}/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["clone_url"]} ]}'
17+

0 commit comments

Comments
 (0)