Skip to content

Instantly share code, notes, and snippets.

@vaibhaw
Forked from potter0815/cloneall.sh
Created August 20, 2021 22:37
Show Gist options
  • Select an option

  • Save vaibhaw/ce8faddd8d863d996871beb61e637c4d to your computer and use it in GitHub Desktop.

Select an option

Save vaibhaw/ce8faddd8d863d996871beb61e637c4d to your computer and use it in GitHub Desktop.

Revisions

  1. @potter0815 potter0815 revised this gist May 17, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions cloneall.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    #!/bin/bash
    #requires jq -> http://stedolan.github.io/jq/

    #optional change working_dir
    working_dir=${1-$(pwd)}
    cd $working_dir

    user="github_username"
    token="application token"
  2. @potter0815 potter0815 created this gist May 16, 2015.
    17 changes: 17 additions & 0 deletions cloneall.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/bin/bash
    #requires jq -> http://stedolan.github.io/jq/


    user="github_username"
    token="application token"
    organization="Organization_Name"


    repo_list=$(curl https://api.github.com/orgs/$organization/repos?type=private\&per_page=100 -u ${user}:${token} | jq .[].ssh_url | sed -e 's/^"//' -e 's/"$//')

    for repo in $repo_list
    do

    echo "Repo found: $repo"
    git clone $repo
    done