-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel fails to download file with error "PKIX path building failed." #3915
Comments
I have forced bazel to use the System java's trust store with the following startup flags:
And it successfully fetches the file. Haven't debugged what bazel is using instead of those. But maybe a built in one? |
So debugged it and it is confusing OS x stuff, not a bazel issue. But hopefully this will help a future person who runs into this. So OS X has two ways of installing java. The one that is in 'System Preferences' is the JavaAppletPlugin and is (I believe) just the JRE. You can also install the JDK which is stored under "/Library/Java/JavaVirtualMachines". /usr/bin/java uses the jdk, and I believe that is how bazel is getting its 'java'. This is updated by downloading from oracle. And the truststore that java uses by default is baked into the jdk. Thus if you are running with an older JDK you may not have as many root certificates in your truststore and run into this issue. The solution is to update your JDK and hopefully the certificate that you need to trust is signed by one of the newer root certificates. |
This has the solution. For me in windows, after installing the top level certificate in C:\Program Files\Android\Android Studio1\jre\lib\security\cacerts it was bazel --host_jvm_args=-Djavax.net.ssl.trustStore="C:\Program Files\Android\Android Studio1\jre\lib\security\cacerts" --host_jvm_args=-Djavax.net.ssl.trustStorePassword=changeit build <...your build commands> |
Description of the problem / feature request / question:
I cannot get bazel to download busybox.
I have the following rule in my workspace:
When I fetch I get the following:
Yet wget is able to download the file fine and the sha256 is the same as is in the rule.
Environment info
Operating System:
OS X 10.11.6 (15G31)
Bazel version (output of
bazel info release
):0.6.1
Have you found anything relevant by searching the web?
It looks like this is a common error if the certificate is bad. But if that is the issue then it means that bazel is not using my system's trust store as Chrome and wget seem to be able to do.
The text was updated successfully, but these errors were encountered: