LoginSignup
2
3

More than 5 years have passed since last update.

Homebrewで「The GitHub credentials in the macOS keychain may be invalid.」エラー発生

Last updated at Posted at 2017-10-09

brewコマンド実行時にGitHub周りでエラーが発生したので対処した話。

エラー内容

$ brew search tree                                                                                                                                 ✘ 1
==> Searching local taps...
mvptree                            pstree                             tree ✔                             treecc                             treefrog
==> Searching taps on GitHub...
Error: GitHub
The GitHub credentials in the macOS keychain may be invalid.
Clear them with:
  printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
Or create a personal access token:
  https://github.com/settings/tokens/new?scopes=gist,public_repo&description=Homebrew
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"

対応

「キーチェーンアクセス」アプリから「github.com」のエントリを削除。

コメントでご指摘頂きまして、アプリから手動削除するより以下のコマンドを実行しましょう。

$ printf "protocol=https\nhost=github.com\n" | git credential-osxkeychain erase
2
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3