bazelisk
bazelisk copied to clipboard
Get "https://www.googleapis.com /storage/v1/b/bazel/o?delimiter=/": proxyconnect tcp: net/http: TLS handshake timeout
bazel is banned in Iran. So I set linux proxy (HTTPS_PROXY to https://127.0.0.1:8118) which is Tor via privoxy. Anyways, it seems bazel can't pass through proxy
when I run:
bazel --version
it gives me:
23:31:14 could not resolve the version 'latest' to an actual version number: unab
le to determine latest version: could not list Bazel versions in GCS bucket: could not list
GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch
https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com
/storage/v1/b/bazel/o?delimiter=/": proxyconnect tcp: net/http: TLS handshake timeout
I'm facing the same problem with you (China ) Have you ever fixed the problem?plz
try to install bazelisk using this:
npm install -g @bazel/bazelisk
or from GitHub:
https://github.com/bazelbuild/bazelisk
Bazelisk tries to find a suitable version of Bazel and install it, to tell it where to look for Bazel, set this variable before calling it.
export BAZELISK_BASE_URL="https://github.com/bazelbuild/bazel/releases/download"
This address isn't blocked and you should be able to install Bazel.
Thanks for replying. But things has not taken a turn for the better with showing the following infos:
2021/05/02 22:10:25 could not resolve the version 'latest' to an actual version number: unable to determine latest version: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/": read tcp 192.168.1.109:46620->216.58.200.42:443: read: connection reset by peer
even the former one which has been built by bazel could run now
I guess it can't map latest
to a specific version.
This is the github page for bazelisk. read their README
https://github.com/bazelbuild/bazelisk
In part of it, it writes, read that part:
How does Bazelisk know which Bazel version to run?
Also in this page you can find releases of Bazel:
https://github.com/bazelbuild/bazel/releases
so you can set your desired version. PLEASE Note, I said make this setting:
export BAZELISK_BASE_URL="https://github.com/bazelbuild/bazel/releases/download"
before you running bazelisk
===============
Another solution is using a proxy server, or using Tor, however they need more descriptions... There could be also solution that disable checking GSC, again I don't find what was the setting, it was again about setting an environment variable maybe "CHECK_GSC_BUCKET" to false, I don't remember. You even might be able to download and make bazel from source...