Last active
June 4, 2018 01:48
-
-
Save ianwremmel/7e90c4daead27d2481a27c3d21628951 to your computer and use it in GitHub Desktop.
backup your github repos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
NAMES=$(curl -n 'https://api.github.com/user/repos?affiliation=owner&per_page=100' | jq -r .[].name) | |
for NAME in $NAMES; do | |
echo $NAME | |
git clone "[email protected]:$GITHUB_USERNAME/$NAME.git" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment