Last active
August 23, 2020 00:56
-
-
Save xddq/0436e7bf907d5ed794fe489b06bbac14 to your computer and use it in GitHub Desktop.
automaticly download all public and private repos of a user using the github api(v3) under linux
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/sh | |
# Just replace USERNAME and TOKENVALUE with your username and personal access | |
# token value(make sure you set it up with "full control of private repository" | |
# checked. Obviously you need to have set up a ssh key for your account as well. | |
curl -u USERNAME:TOKENVALUE \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/user/repos | grep git_url | sed -E sQ.*.com\/\|\",QQg \ | |
| xargs -I% git clone [email protected]:% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment