Error: GitHub API rate limit exceeded for ip. See http://developer.github.com/v3/#rate-limiting for details. You may want to create an API token: http://github.com/settings/applications and then set HOMEBREW_GITHUB_API_TOKEN.
這是 homebrew 在 API 上的限制,避免被大量佔用流量,在訊息中有提到可以到 github 去建立 api token,但是鏈結在 https://github.com/settings/tokens
Step.1 到 Personal access tokens 頁面,點選 Generate new token,建立新 token

Step.2 打上 Token description 並選擇 Token 使用限制,最後按 Generate token 建立完成

Step.3 把 step.2 的 token 加入 .bash_profile
確認你的 brew 位置是位於 /usr/local/bin/brew,然後加入以下。
$ vim ~/.bash_profile
if [ -f /usr/local/bin/brew ];then
export HOMEBREW_GITHUB_API_TOKEN=60fce2elfe33dfge3292f47fba713efc12a24983
fi
在重新登入一次,確認 HOMEBREW_GITHUB_API測試 homebrew 應該不會在出現訊息了!
$ echo $HOMEBREW_GITHUB_API_TOKEN
60fce2elfe33dfge3292f47fba713efc12a24983
Orignal From: OS X 被限制的 Homebrew : GitHub API rate limit exceeded for ip
沒有留言:
張貼留言