Created
March 16, 2017 05:00
-
-
Save Daniel-M/91ae247a21e0d861251242893cb9c3be to your computer and use it in GitHub Desktop.
Clone all user repositories at github using the simple autentication method with the github API. User needs to be authenticated
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
#!/bin/bash | |
username="" # The user to be autenticated | |
script="clone_github_"$username"_repos.sh" | |
curl -i -u $username https://api.github.com/user/repos | awk 'index($line,"ssh_url") { print $line}' | sed '{s/"//g;s/,$//g;s/ *ssh_url\:/git clone/}' > $script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment