brew installで limit exceeded

brew installでエラーがでた。

Error: GitHub API rate limit exceeded for 210.148.137.104. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
You may want to create an API token: https://github.com/settings/applications
and then set HOMEBREW_GITHUB_API_TOKEN.


GitHub APIの利用制限に引っかかることがあるらしい。

エラー文言の通り、https://github.com/settings/applicationsのページで
「Personal Access Tokens」の「Create new token」ボタンを押し、
作成したtokenを環境変数に設定すれば使えるようになった。

export HOMEBREW_GITHUB_API_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx