- GitHub對(duì)unauthenticated用戶的請(qǐng)求限制為60次/小時(shí)相叁,與文件大小無關(guān)峻仇,但是只能發(fā)送60次下載請(qǐng)求小染。對(duì)authenticated用戶的限制則為5000次/小時(shí)渣玲。
- 因此如果一次性從github下載了太多包器贩,就可能從某個(gè)包開始出現(xiàn)如下報(bào)錯(cuò)
HTTP error 403.
API rate limit exceeded for "這里是你的IP". (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
Rate limit remaining: 0/60
Rate limit reset at: 2020-10-27 12:48:31 UTC
To increase your GitHub API rate limit
- Use `usethis::browse_github_pat()` to create a Personal Access Token.
- Use `usethis::edit_r_environ()` and add the token as `GITHUB_PAT`.
- 處理要點(diǎn)就在最后兩行代碼中(也可以手動(dòng)進(jìn)入GitHub操作)
- 首先在Rstudio中輸入
usethis::browse_github_pat()
- console中返回
Opening URL 'https://github.com/settings/tokens/new?scopes=repo,gist,user:email&description=R:GITHUB_PAT'
* Call `usethis::edit_r_environ()` to open '.Renviron'.
* Store your PAT (personal access token) with a line like:
GITHUB_PAT=xxxyyyzzz
[Copied to clipboard]
* Make sure '.Renviron' ends with a newline!
-
同時(shí)瀏覽器自動(dòng)跳轉(zhuǎn)到GitHub的這個(gè)界面
regenerate token左邊會(huì)顯示一串token偏友,將它復(fù)制下來(現(xiàn)在是保存后的樣子) - 然后進(jìn)入https://travis-ci.com/蔬胯,可以使用GitHub賬戶登錄,從主頁(yè)選擇這個(gè)setting界面
點(diǎn)擊右邊的setting -
來到environment variables欄目
就是這里 - 按照剛才GitHub personal access token的名字和密碼填入Name和Value位他,Branch可以默認(rèn)選擇所有氛濒,然后Add
- 重新在Rstudio安裝包,限制解除