Automatically download a user's repository on Github

it's fine to use shell script to get job done

username='pat'
wget -N -O "github_user.list" "https://api.github.com/users/${username}/repos?per_page=100"
grep -w "clone_url" github_user.list> list.txt
sed -i 's/"clone_url":/git clone/g' ./list.txt
###delete last comma ","
sed -i "s/.$//g" ./list.txt
bash list.txt

save this script and run it.

It is suitable for most individual users, except commercial companies.

posted @ 2020-05-10 17:41  千家诗  阅读(174)  评论(0编辑  收藏  举报