Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a simple way to clone all Starred repos from GitHub?

Tags:

github

I am looking to backup all my Starred repositories and I'm searching for a simple a way to do it.

like image 616
Adí Avatar asked Apr 27 '14 21:04

Adí


Video Answer


1 Answers

This should do it. Note you will need jq

curl https://api.github.com/users/<user>/starred |
  jq -r '.[].html_url' |
  xargs -l git clone

If you don't want to use jq you can replace with this ugly awk line

awk '/^ {4}"html_url"/&&$0=$4' FS='"' |
like image 181
4 revs, 2 users 94% Avatar answered Dec 14 '22 23:12

4 revs, 2 users 94%