Open guw opened 1 year ago
Hi @guw! It would be really helpful if you can provide a minimal reproduce case with sample code, thank you!
@kshyanashree This requires setting up a GitHub Enterprise instance with SAML redirect to reproduce. It's not trivial and cannot be shared "in code". We are interested in contributing a fix. We are awaiting guidance from Bazel team how a fix should look like.
Description of the bug:
Prerequisites:
http_repository
to fetch from authentication protected https source (eg. GitHub Enterprise).netrc
set up and used by Bazel to authenticate with protected source.netrc
fileThe Bazel output is:
What happens is that when you hit the protected source it redirect to a login page.
I think this is where Bazel forgets to check the
content-type
. Ifhttp_repository
is configured to a.zip
filetext/html
is wrong.Two things come to my mind:
content-type
header. If this is a miss then the download should be aborted.location
url for keywords such aslogin
.The SHA mismatch error is leading to a lot confused Bazel users and increasing support load.
Expected Behavior:
Bazel should report an error that gives better hint that:
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release
?6.1.1