[英]Download a large number of github open source projects
我正在尝试下载大量的开源项目,比如说100,000。
我首先使用github api来获得很多带有用户名的项目名称。 然后,我使用以下shell脚本下载了所有项目:
file="repo-list.txt"
while IFS= read -r line
do
echo "https://github.com/$line.git"
git clone "https://github.com/$line.git"
done <"$file"
问题是终端经常弹出一个要求输入用户名和密码的请求。 这样,我无法下载很多项目。 我确实使用以下行更改了git设置:
git config --global credential.helper 'cache --timeout=3600'
repo-list.txt包含如下文本行:
sakachi99/MarkTracker
gnud/rainbow-shooter
whistlerbrk/ripple
jimpick/jaikuengine
kemper/ai-contest-ruby
jmtame/will_paginate
tom317/shopaholic
JasonTrue/fluent-nhibernate
jphalip/django-treemenus
jonashaag/configfiles
dchristo/CodeProblems
jesperdj/scala-maven-example
jchris/ohai
blueyed/fred-staging
jasonmcleod/hashbrowns.js
有没有一种方法可以跳过请求,或者有更好的方法从github下载大量项目?
如果相反
git clone "git://github.com/$line.git"
然后,假设存储库是公共的,git不会提示您输入任何凭据。 它也会稍微快一点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.