Solvedbrew SSL error when downloading from homebrew.bintray.com

brew config output

HOMEBREW_VERSION: 3.0.2-112-g236c622
ORIGIN: https://github.com/Homebrew/brew
HEAD: 236c622b201fc00c36d7cf89d38ecb95db148c1c
Last commit: 12 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2eac3c31694fe4a1a4a4ee69d32215eddb949b16
Core tap last commit: 43 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 12.0 build 1200
Git: 2.30.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.2.2-x86_64
CLT: 12.4.0.0.1.1610135815
Xcode: 12.4

brew doctor output

Your system is ready to brew.

  • The brew doctor above contains no "Warning" lines.

What were you trying to do (and why)?

brew upgrade

What happened (include all command output)?

% brew upgrade -v
==> Upgrading 4 outdated packages:
boost 1.75.0_1 -> 1.75.0_2
icu4c 67.1 -> 68.2
harfbuzz 2.7.4 -> 2.7.4_1
node 15.10.0 -> 15.10.0_1
==> Upgrading icu4c 67.1 -> 68.2
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --range 0-1 --dump-header - --write-out \%\{http_code\} --output /dev/null https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --fail --retry 3 --location --remote-time --continue-at 0 --output /Users/andreas/Library/Caches/Homebrew/downloads/9f189274160b8c0c4884e1b43cd8fb135852a035496379bf9dc447028120d8da--icu4c-68.2.big_sur.bottle.tar.gz.incomplete https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "icu4c"
Download failed: https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
==> Upgrading boost 1.75.0_1 -> 1.75.0_2
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
==> Downloading https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --range 0-1 --dump-header - --write-out \%\{http_code\} --output /dev/null https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/3.0.2-112-g236c622\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.2.2\)\ curl/7.64.1 --header Accept-Language:\ en --fail --retry 3 --location --remote-time --continue-at 0 --output /Users/andreas/Library/Caches/Homebrew/downloads/9f189274160b8c0c4884e1b43cd8fb135852a035496379bf9dc447028120d8da--icu4c-68.2.big_sur.bottle.tar.gz.incomplete https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "icu4c"
Download failed: https://homebrew.bintray.com/bottles/icu4c-68.2.big_sur.bottle.tar.gz

[...same for other packages...]

What did you expect to happen?

Upgrade completes successfully

Step-by-step reproduction instructions (by running brew commands)

Run brew upgrade -v, see above.

36 Answers

✔️Accepted Answer

As a temporary workaround, I've found adding this to your /etc/hosts works:
54.188.157.32 homebrew.bintray.com

It looks like the bintray subdomains are all now CNAMEs to jfrog.com without valid certificates, so CloudFront drops the connection. This IP is one that was found on a bintray.com subdomain a few days ago:
image
image

Other Answers:

Bo98
111

As a workaround, you may temporarily use HOMEBREW_BOTTLE_DOMAIN=https://dl.bintray.com/homebrew (don't do this permanently or you'll have issues when we switch over from Bintray in the coming weeks)

I don't suppose Homebrew has an option for ignoring SSL errors?

Personally, I'd rather wait for the issue to be resolved than to ignore the security provided by SSL.

Hi, how can I do that?

export HOMEBREW_BOTTLE_DOMAIN=https://dl.bintray.com/homebrew

Confirmed; it seems to be fixed.

More Issues: