Skip to content

Instantly share code, notes, and snippets.

@shaoshing
Created May 24, 2018 01:19
Show Gist options
  • Save shaoshing/3d7bb8cb550eec5835cabbae2cb23dc7 to your computer and use it in GitHub Desktop.
Save shaoshing/3d7bb8cb550eec5835cabbae2cb23dc7 to your computer and use it in GitHub Desktop.
Clone all private github repos
TOKEN="[PERSONAL-ACCESS-TOKEN]"
curl -u "$TOKEN:x-oauth-basic" -s https://api.github.com/user/repos?visibility=private |
awk '/ssh_url/ {print $2}' |
sed 's/[\"\,]//g' |
xargs -L1 git clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment