Last active
January 12, 2016 15:30
-
-
Save audy/f7ae8a0ae45397622945 to your computer and use it in GitHub Desktop.
clone $user's GitHub repos
This file contains hidden or 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
#!/bin/bash | |
USERNAME=`whoami` | |
PASSWORD=`pass github` | |
set -euo pipefail | |
REPOSITORIES=$(curl \ | |
--user ${USERNAME}:${PASSWORD} \ | |
--silent \ | |
https://api.github.com/users/${USERNAME}/repos?per_page=200 \ | |
| jq --raw-output '.[] | .git_url') | |
for repository in ${REPOSITORIES}; do | |
git clone ${repository} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment