Exception: GitHub::API::AuthenticationFailedError Private
- Defined in:
- utils/github/api.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Error when authentication fails.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
- #initialize(credentials_type, github_message) ⇒ void constructor private
Constructor Details
#initialize(credentials_type, github_message) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'utils/github/api.rb', line 98 def initialize(credentials_type, ) = "GitHub API Error: #{}\n" << case credentials_type when :github_cli_token <<~EOS Your GitHub CLI login session may be invalid. Refresh it with: gh auth login --hostname github.com EOS when :keychain_username_password <<~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 EOS when :env_token require "utils/formatter" <<~EOS HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check: #{Formatter.url("https://github.com/settings/tokens")} EOS when :none NO_CREDENTIALS_MESSAGE end super .freeze, end |