Brew installation fail on catalina

After running the installation script:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

I got a very confusing message:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch origin --force
==> Installation successful!

When I try to run brew, it just says zsh: command not found: brew

Any ideas?

This looks just like the problem I’m having on High Sierra!

It looks like it falls over trying to install homebrew-core

Somehow the connection is getting cut of before the complete download is done (and it somehow sees that as a success)

Now brew is working, except now I get that error from above when I try to install anything. It gets to about 43%of downloading homebrew-core and I get:

Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` exited with 128.

Are there no workarounds for this?

Unfortunately there’s no workarounds for slow connections. There’s nothing that homebrew can do, it’s already globally distributed on fast github servers.

My connection is fast - I think my isp is throttling large downloads/clones. I used a vpn and it worked fine.