How to fix “keyCertSign bit is not set” and “Could not generate DH keypair” errors

You may encounter following error messages when you try to connect to a remote site via a remote repository.

Connection failed with exception: PKIX path validation failed: CA key usage check failed: keyCertSign bit is not set

I/O exception ( caught when processing request: java.lang.RuntimeException: Could not generate DH keypair

These errors can be shown if you are using an order version of JDK (e.g. JDK 1.6.x) due to bugs found in JDK. Please upgrade your JDK to the latest ones to resolve the issue.