我正在尝试下载大量的开源项目,比如100000个。
我首先使用github获取了许多项目名称及其用户名。然后,我使用以下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'text包含如下文本行:
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下载大量项目?
发布于 2015-07-28 20:45:13
如果你不这么做
git clone "git://github.com/$line.git"然后,假设存储库是公共的,git不会提示您提供任何凭据。它也会稍微快一些。
https://stackoverflow.com/questions/31686606
复制相似问题