Merge pull request #5090 from JBallin/gist-token-error
Clarify how to set HOMEBREW_GITHUB_API_TOKEN
This commit is contained in:
commit
b167a88e4d
@ -45,8 +45,8 @@ module Homebrew
|
||||
if GitHub.api_credentials_type == :none
|
||||
puts <<~EOS
|
||||
You can create a new personal access token:
|
||||
#{GitHub::ALL_SCOPES_URL}
|
||||
and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method.
|
||||
#{GitHub::ALL_SCOPES_URL}
|
||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||
|
||||
EOS
|
||||
login!
|
||||
|
||||
@ -33,7 +33,7 @@ module GitHub
|
||||
GitHub API Error: #{github_message}
|
||||
Try again in #{pretty_ratelimit_reset(reset)}, or create a personal access token:
|
||||
#{ALL_SCOPES_URL}
|
||||
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
|
||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||
EOS
|
||||
end
|
||||
|
||||
@ -58,7 +58,7 @@ module GitHub
|
||||
printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase
|
||||
Or create a personal access token:
|
||||
#{ALL_SCOPES_URL}
|
||||
and then set the token as: export HOMEBREW_GITHUB_API_TOKEN="your_new_token"
|
||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||
EOS
|
||||
end
|
||||
super message
|
||||
@ -135,16 +135,18 @@ module GitHub
|
||||
Your macOS keychain GitHub credentials do not have sufficient scope!
|
||||
Scopes they need: #{needed_human_scopes}
|
||||
Scopes they have: #{credentials_scopes}
|
||||
Create a personal access token: #{ALL_SCOPES_URL}
|
||||
and then set HOMEBREW_GITHUB_API_TOKEN as the authentication method instead.
|
||||
Create a personal access token:
|
||||
#{ALL_SCOPES_URL}
|
||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||
EOS
|
||||
when :environment
|
||||
onoe <<~EOS
|
||||
Your HOMEBREW_GITHUB_API_TOKEN does not have sufficient scope!
|
||||
Scopes they need: #{needed_human_scopes}
|
||||
Scopes it has: #{credentials_scopes}
|
||||
Create a new personal access token: #{ALL_SCOPES_URL}
|
||||
and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method instead.
|
||||
Create a new personal access token:
|
||||
#{ALL_SCOPES_URL}
|
||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user