Exception: GitHub::API::AuthenticationFailedError Private
- Defined in:
- brew/Library/Homebrew/utils/github/api.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Error when authentication fails.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(github_message) ⇒ AuthenticationFailedError
constructor
private
A new instance of AuthenticationFailedError.
Constructor Details
#initialize(github_message) ⇒ AuthenticationFailedError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AuthenticationFailedError.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'brew/Library/Homebrew/utils/github/api.rb', line 64 def initialize() @github_message = = +"GitHub #{}:" << if Homebrew::EnvConfig.github_api_token <<~EOS HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check: #{Formatter.url("https://github.com/settings/tokens")} EOS else <<~EOS The GitHub credentials in the macOS keychain may be invalid. Clear them with: printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase #{CREATE_GITHUB_PAT_MESSAGE} EOS end super .freeze end |