Method: GitHubService::Configuration#auth_token

Defined in:
lib/git-process/github_configuration.rb

#auth_token(opts = {}) ⇒ String

Returns to OAuth token. If it's in .git/config, returns that. Otherwise it connects to GitHub to get the authorization token.

Parameters:

  • opts (Hash) (defaults to: {})

Options Hash (opts):

  • :base_url (String)

    The base URL to use for the GitHub server

  • :remote_name (String) — default: #remote_name

    The "remote" name to use (e.g., 'origin')

  • :user (String)

    the username to authenticate with

  • :password (String) — default: #password

    the password to authenticate with

Returns:



219
220
221
# File 'lib/git-process/github_configuration.rb', line 219

def auth_token(opts = {})
  get_config_auth_token() || create_authorization(opts)
end