Skip to content

Instantly share code, notes, and snippets.

@potter0815
Last active March 2, 2026 11:43
Show Gist options
  • Select an option

  • Save potter0815/42dda83fa1709693be36 to your computer and use it in GitHub Desktop.

Select an option

Save potter0815/42dda83fa1709693be36 to your computer and use it in GitHub Desktop.

Revisions

  1. 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 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