Skip to content

Instantly share code, notes, and snippets.

@DeepInThought
Forked from syntaqx/clone.sh
Created May 30, 2019 09:43
Show Gist options
  • Save DeepInThought/ba2011017b10f2061bfa10765377939e to your computer and use it in GitHub Desktop.
Save DeepInThought/ba2011017b10f2061bfa10765377939e to your computer and use it in GitHub Desktop.
Clone all of the projects for a given user or organization.
#!/bin/bash
# Simple helper script that iterates over available repositories and clones them down.
# I know it could use some work.
export USER=syntaqx
curl -u $GITHUB_TOKEN:x-oauth-basic 'https://api.github.com/orgs/$USER/repos?per_page=100' | jq '.[].ssh_url' -r | while read url; do git clone "$url"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment