Skip to content

Instantly share code, notes, and snippets.

@ianwremmel
Last active June 4, 2018 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianwremmel/7e90c4daead27d2481a27c3d21628951 to your computer and use it in GitHub Desktop.
Save ianwremmel/7e90c4daead27d2481a27c3d21628951 to your computer and use it in GitHub Desktop.
backup your github repos
#!/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 "git@github.com:$GITHUB_USERNAME/$NAME.git"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment