[bazel.build] unable to find valid certification path behind proxy
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
I am seeing issue with `bazel build` whenever I am running behind company's VPN even with `http_proxy` and `https_proxy` being set. It is unclear to me what is happening here as
https://github.com/bazelbuild/bazel/issues/5741#issuecomment-418071387 the workaround here doesn't work as well.
Unsetting the `http_proxy` and `https_proxy`, and getting out of VPN helps but will be unable to run CICD properly.
```
ERROR: An error occurred during the fetch of repository 'org_pcre_ftp':
Traceback (most recent call last):
File "/home/vscode/.cache/bazel/_bazel_vscode/d384688eb617fe7d4be16f77150b3156/external/bazel_tools/tools/build_defs/repo/http.bzl", line 125, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://ftp.exim.org/pub/pcre/pcre-8.44.tar.gz] to /home/vscode/.cache/bazel/_bazel_vscode/d384688eb617fe7d4be16f77150b3156/external/org_pcre_ftp/temp3322144077550984114/pcre-8.44.tar.gz: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested tar
```
Contributor guide
Research direction
Start with tools/build_defs/repo/http.bzl at the reported download_and_extract call and reproduce bazel build for the org_pcre_ftp repository with the proxy and VPN settings described. Compare the PKIX failure with the workaround in issue #5741; done means the external archive fetch succeeds in that environment or the failure is clearly diagnosed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, networking, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100