Error messages
Homebrew fails with “curl: (28)” on Mac
Homebrew downloads with curl. curl exit code 28 is a timeout. The curl documentation says: “The specified time-out period was reached.”
Symptoms
brew installstops withcurl: (28), then a message that the time ran out.- Homebrew says that it failed to download a resource.
- Downloads fail on a slow network, a VPN or a company network.
Likely causes
- A slow or lossy connection. Large bottles time out on a weak Wi-Fi or a hotspot.
- A proxy that curl does not use. Homebrew uses
http_proxy,https_proxyandall_proxy. - A firewall that drops traffic. A network that drops connections to the download host causes a timeout.
- A broken IPv6 path. The download host has an IPv6 address, and IPv6 does not work.
How to check
Let Homebrew check your system.
brew doctorTest the download host with curl, IPv4 only.
curl -4 -I https://ghcr.io/v2/Show the proxy variables.
env | grep -i proxyMeasure the connection.
networkQuality
How to fix it
Let Homebrew try more times. The default is 3 retries.
export HOMEBREW_CURL_RETRIES=5If the network needs a proxy, set it in the same shell.
export https_proxy=http://proxy.example.com:8080If your company has a mirror, set
HOMEBREW_BOTTLE_DOMAINandHOMEBREW_API_DOMAIN.Run the command again on a faster network, if you can.
With Kilobat
Check if the network is metered, on a VPN or slow.
kilobat conditionsKilobat's connection doctor tests the host layer by layer: network, proxy, DNS, rules, IPv4, IPv6, TLS and the server. It names the layer that failed.
kilobat why https://ghcr.io/v2/Keep the Mac awake while the install runs.
kilobat awake -- brew upgradeThese Kilobat checks are free. AI agents run them through MCP with
diagnose_connectionanddiagnose_network. See Find why one site or API won't connect.
Questions
What is curl error 28?
It is CURLE_OPERATION_TIMEDOUT. The curl man page lists exit code 28 as an operation timeout.
Sources
- curl: libcurl error codes
- curl(1), EXIT CODES, man page installed with macOS 27.2
- Homebrew Docs: Manpage, environment variables
- brew(1), HOMEBREW_CURL_RETRIES, man page installed with Homebrew
Sources checked on 29 October 2026. Man pages are the ones installed with macOS; open one with man <name> in Terminal.