diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index b653558c5b..aa70f50ed8 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -444,7 +444,7 @@ fi
if [[ -n "$HOMEBREW_MACOS" || -n "$HOMEBREW_FORCE_HOMEBREW_ON_LINUX" ]]
then
- HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://homebrew.bintray.com"
+ HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://ghcr.io/v2/homebrew/core"
else
HOMEBREW_BOTTLE_DEFAULT_DOMAIN="https://linuxbrew.bintray.com"
fi
diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh
index 74a6b48c71..6566c1e2c8 100644
--- a/Library/Homebrew/cmd/vendor-install.sh
+++ b/Library/Homebrew/cmd/vendor-install.sh
@@ -17,17 +17,19 @@ if [[ -n "$HOMEBREW_MACOS" ]]
then
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
then
- ruby_URL="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz"
- ruby_URL2="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz"
+ ruby_FILENAME="portable-ruby-2.6.3_2.yosemite.bottle.tar.gz"
ruby_SHA="b065e5e3783954f3e65d8d3a6377ca51649bfcfa21b356b0dd70490f74c6bd86"
+ ruby_URL="https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:$ruby_SHA"
+ ruby_URL2="https://homebrew.bintray.com/bottles-portable-ruby/$ruby_FILENAME"
fi
elif [[ -n "$HOMEBREW_LINUX" ]]
then
case "$HOMEBREW_PROCESSOR" in
x86_64)
- ruby_URL="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz"
- ruby_URL2="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz"
+ ruby_FILENAME="portable-ruby-2.6.3_2.x86_64_linux.bottle.tar.gz"
ruby_SHA="97e639a64dcec285392b53ad804b5334c324f1d2a8bdc2b5087b8bf8051e332f"
+ ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/$ruby_FILENAME"
+ ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.6.3_2/$ruby_FILENAME"
;;
esac
fi
@@ -81,11 +83,13 @@ fetch() {
curl_args[${#curl_args[*]}]="-q"
fi
+ # Authorization is needed for GitHub Packages but harmless on Bintray/GitHub Releases
curl_args+=(
--fail
--remote-time
--location
--user-agent "$HOMEBREW_USER_AGENT_CURL"
+ --header "Authorization: Bearer QQ=="
)
if [[ -n "$HOMEBREW_QUIET" ]]
@@ -197,7 +201,7 @@ install() {
fi
safe_cd "$VENDOR_DIR"
- [[ -n "$HOMEBREW_QUIET" ]] || ohai "Pouring $(basename "$VENDOR_URL")" >&2
+ [[ -n "$HOMEBREW_QUIET" ]] || ohai "Pouring $VENDOR_FILENAME" >&2
tar "$tar_args" "$CACHED_LOCATION"
safe_cd "$VENDOR_DIR/portable-$VENDOR_NAME"
@@ -249,12 +253,14 @@ homebrew-vendor-install() {
[[ -n "$HOMEBREW_DEBUG" ]] && set -x
check_linux_glibc_version
+ filename_var="${VENDOR_NAME}_FILENAME"
+ sha_var="${VENDOR_NAME}_SHA"
url_var="${VENDOR_NAME}_URL"
url2_var="${VENDOR_NAME}_URL2"
- sha_var="${VENDOR_NAME}_SHA"
+ VENDOR_FILENAME="${!filename_var}"
+ VENDOR_SHA="${!sha_var}"
VENDOR_URL="${!url_var}"
VENDOR_URL2="${!url2_var}"
- VENDOR_SHA="${!sha_var}"
VENDOR_VERSION="$(<"$VENDOR_DIR/portable-$VENDOR_NAME-version")"
if [[ -z "$VENDOR_URL" || -z "$VENDOR_SHA" ]]
@@ -262,7 +268,7 @@ homebrew-vendor-install() {
odie "No Homebrew $VENDOR_NAME $VENDOR_VERSION available for $HOMEBREW_PROCESSOR processors!"
fi
- CACHED_LOCATION="$HOMEBREW_CACHE/$(basename "$VENDOR_URL")"
+ CACHED_LOCATION="$HOMEBREW_CACHE/$VENDOR_FILENAME"
lock "vendor-install-$VENDOR_NAME"
fetch
diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb
index cd8ff0a1a5..bd55be7aab 100644
--- a/Library/Homebrew/env_config.rb
+++ b/Library/Homebrew/env_config.rb
@@ -52,8 +52,8 @@ module Homebrew
"download from the prefix `http://localhost:8080/`. " \
"If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` " \
"they will be downloaded from the default bottle domain.",
- default_text: "macOS: `https://homebrew.bintray.com/`, " \
- "Linux: `https://linuxbrew.bintray.com/`.",
+ default_text: "macOS: `https://ghcr.io/v2/homebrew/core`, " \
+ "Linux: `https://linuxbrew.bintray.com`.",
default: HOMEBREW_BOTTLE_DEFAULT_DOMAIN,
},
HOMEBREW_BREW_GIT_REMOTE: {
diff --git a/docs/Manpage.md b/docs/Manpage.md
index be1eae2f0a..009008ed8c 100644
--- a/docs/Manpage.md
+++ b/docs/Manpage.md
@@ -1750,7 +1750,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_BOTTLE_DOMAIN`
Use this URL as the download mirror for bottles. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror. For example, `HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080` will cause all bottles to download from the prefix `http://localhost:8080/`. If bottles are not available at `HOMEBREW_BOTTLE_DOMAIN` they will be downloaded from the default bottle domain.
- *Default:* macOS: `https://homebrew.bintray.com/`, Linux: `https://linuxbrew.bintray.com/`.
+ *Default:* macOS: `https://ghcr.io/v2/homebrew/core`, Linux: `https://linuxbrew.bintray.com`.
- `HOMEBREW_BREW_GIT_REMOTE`
Use this URL as the Homebrew/brew `git`(1) remote.
diff --git a/manpages/brew.1 b/manpages/brew.1
index ad3047178b..1b5b4c059d 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -2458,7 +2458,7 @@ If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op when using
Use this URL as the download mirror for bottles\. If bottles at that URL are temporarily unavailable, the default bottle domain will be used as a fallback mirror\. For example, \fBHOMEBREW_BOTTLE_DOMAIN=http://localhost:8080\fR will cause all bottles to download from the prefix \fBhttp://localhost:8080/\fR\. If bottles are not available at \fBHOMEBREW_BOTTLE_DOMAIN\fR they will be downloaded from the default bottle domain\.
.
.IP
-\fIDefault:\fR macOS: \fBhttps://homebrew\.bintray\.com/\fR, Linux: \fBhttps://linuxbrew\.bintray\.com/\fR\.
+\fIDefault:\fR macOS: \fBhttps://ghcr\.io/v2/homebrew/core\fR, Linux: \fBhttps://linuxbrew\.bintray\.com\fR\.
.
.TP
\fBHOMEBREW_BREW_GIT_REMOTE\fR