Skip to content

Instantly share code, notes, and snippets.

@syntaqx
Created May 27, 2019 18:27
Show Gist options
  • Save syntaqx/d0c61e8f4ce52aebad3b0718ea578e06 to your computer and use it in GitHub Desktop.
Save syntaqx/d0c61e8f4ce52aebad3b0718ea578e06 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