Spec-Zone.ru › Homebrew

Исключение: GitHub::API::AuthenticationFailedError Закрытый

Наследует:
Error
  • Object
  • RuntimeError
  • Error
  • GitHub::API::AuthenticationFailedError
показать все
Определено в:
utils/github/api.rb

Обзор

Этот класс является частью закрытого API. Этот класс можно использовать только в репозитории Homebrew/brew. По возможности сторонним разработчикам следует избегать использования этого класса, поскольку он может быть удалён или изменён без предупреждения.

Ошибка при сбое аутентификации.

Краткое описание методов экземпляра свернуть

  • #initialize(credentials_type, github_message) ⇒ void конструктор закрытый

Методы, включённые из Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_upgradable, #pretty_warning

Подробное описание конструкторов

#initialize(credentials_type, github_message) ⇒ void

Этот метод является частью закрытого API. Этот метод можно использовать только в репозитории Homebrew/brew. По возможности сторонним разработчикам следует избегать использования этого метода, поскольку он может быть удалён или изменён без предупреждения.

Параметры:

  • credentials_type (Symbol)
  • github_message (String)


113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'utils/github/api.rb', line 113

def initialize(credentials_type, github_message)
  message = "GitHub API Error: #{github_message}\n"
  message << 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 message.freeze, github_message
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/GitHub/API/AuthenticationFailedError.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API