Deprecate GitHub basic authentication.

This API authentication path will be disabled on Nov 13 2020.
This commit is contained in:
Jonathan Chang 2020-10-01 17:12:52 +10:00
parent fc6ef72ee0
commit 6fb72f4d71
5 changed files with 10 additions and 7 deletions

View File

@ -60,6 +60,7 @@ module Homebrew
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")} #{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
EOS EOS
odeprecated "`brew gist-logs` with a password", "HOMEBREW_GITHUB_API_TOKEN"
login! login!
end end

View File

@ -148,7 +148,7 @@ module Homebrew
}, },
HOMEBREW_GITHUB_API_PASSWORD: { HOMEBREW_GITHUB_API_PASSWORD: {
description: "Use this password for authentication with the GitHub API, for features " \ description: "Use this password for authentication with the GitHub API, for features " \
"such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead.", "such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.",
}, },
HOMEBREW_GITHUB_API_TOKEN: { HOMEBREW_GITHUB_API_TOKEN: {
description: "Use this personal access token for the GitHub API, for features such as " \ description: "Use this personal access token for the GitHub API, for features such as " \
@ -160,7 +160,7 @@ module Homebrew
}, },
HOMEBREW_GITHUB_API_USERNAME: { HOMEBREW_GITHUB_API_USERNAME: {
description: "Use this username for authentication with the GitHub API, for features " \ description: "Use this username for authentication with the GitHub API, for features " \
"such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead.", "such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.",
}, },
HOMEBREW_GIT_EMAIL: { HOMEBREW_GIT_EMAIL: {
description: "Set the Git author and committer name to this value.", description: "Set the Git author and committer name to this value.",

View File

@ -91,6 +91,8 @@ module GitHub
return unless Homebrew::EnvConfig.github_api_username return unless Homebrew::EnvConfig.github_api_username
return unless Homebrew::EnvConfig.github_api_password return unless Homebrew::EnvConfig.github_api_password
odeprecated "the GitHub API with HOMEBREW_GITHUB_API_PASSWORD", "HOMEBREW_GITHUB_API_TOKEN"
[Homebrew::EnvConfig.github_api_password, Homebrew::EnvConfig.github_api_username] [Homebrew::EnvConfig.github_api_password, Homebrew::EnvConfig.github_api_username]
end end

View File

@ -1672,7 +1672,7 @@ For example, you might add something like the following to your ~/.profile, ~/.b
If set, always use Homebrew's vendored, relocatable Ruby version even if the system version of Ruby is new enough. If set, always use Homebrew's vendored, relocatable Ruby version even if the system version of Ruby is new enough.
* `HOMEBREW_GITHUB_API_PASSWORD`: * `HOMEBREW_GITHUB_API_PASSWORD`:
Use this password for authentication with the GitHub API, for features such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead. Use this password for authentication with the GitHub API, for features such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.
* `HOMEBREW_GITHUB_API_TOKEN`: * `HOMEBREW_GITHUB_API_TOKEN`:
Use this personal access token for the GitHub API, for features such as `brew search`. You can create one at <https://github.com/settings/tokens>. If set, GitHub will allow you a greater number of API requests. For more information, see: <https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting>. Use this personal access token for the GitHub API, for features such as `brew search`. You can create one at <https://github.com/settings/tokens>. If set, GitHub will allow you a greater number of API requests. For more information, see: <https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting>.
@ -1680,7 +1680,7 @@ For example, you might add something like the following to your ~/.profile, ~/.b
*Note:* Homebrew doesn't require permissions for any of the scopes, but some developer commands may require additional permissions. *Note:* Homebrew doesn't require permissions for any of the scopes, but some developer commands may require additional permissions.
* `HOMEBREW_GITHUB_API_USERNAME`: * `HOMEBREW_GITHUB_API_USERNAME`:
Use this username for authentication with the GitHub API, for features such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead. Use this username for authentication with the GitHub API, for features such as `brew search`. This is deprecated in favour of using `HOMEBREW_GITHUB_API_TOKEN`.
* `HOMEBREW_GIT_EMAIL`: * `HOMEBREW_GIT_EMAIL`:
Set the Git author and committer name to this value. Set the Git author and committer name to this value.

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BREW" "1" "September 2020" "Homebrew" "brew" .TH "BREW" "1" "October 2020" "Homebrew" "brew"
. .
.SH "NAME" .SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS \fBbrew\fR \- The Missing Package Manager for macOS
@ -2336,7 +2336,7 @@ If set, always use Homebrew\'s vendored, relocatable Ruby version even if the sy
. .
.TP .TP
\fBHOMEBREW_GITHUB_API_PASSWORD\fR \fBHOMEBREW_GITHUB_API_PASSWORD\fR
Use this password for authentication with the GitHub API, for features such as \fBbrew search\fR\. We strongly recommend using \fBHOMEBREW_GITHUB_API_TOKEN\fR instead\. Use this password for authentication with the GitHub API, for features such as \fBbrew search\fR\. This is deprecated in favour of using \fBHOMEBREW_GITHUB_API_TOKEN\fR\.
. .
.TP .TP
\fBHOMEBREW_GITHUB_API_TOKEN\fR \fBHOMEBREW_GITHUB_API_TOKEN\fR
@ -2347,7 +2347,7 @@ Use this personal access token for the GitHub API, for features such as \fBbrew
. .
.TP .TP
\fBHOMEBREW_GITHUB_API_USERNAME\fR \fBHOMEBREW_GITHUB_API_USERNAME\fR
Use this username for authentication with the GitHub API, for features such as \fBbrew search\fR\. We strongly recommend using \fBHOMEBREW_GITHUB_API_TOKEN\fR instead\. Use this username for authentication with the GitHub API, for features such as \fBbrew search\fR\. This is deprecated in favour of using \fBHOMEBREW_GITHUB_API_TOKEN\fR\.
. .
.TP .TP
\fBHOMEBREW_GIT_EMAIL\fR \fBHOMEBREW_GIT_EMAIL\fR