-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
InsecureRegistryException thrown for all registries including the default registry and distroless registry #1216
Comments
Hi @hedvigoscar, We are aware that some JDKs cannot verify certain servers. We've seen it with certain JDK 9 and JDK 10 (like in this case). You said your environment is Java 9.0.4. I just downloaded OpenJDK 9.0.4 from jdk.java.net and noticed it cannot verify Docker Hub. (BTW, OpenJDK 9.0.4 does not include security fixes and no longer recommended for use in production.)
Then you get the following error:
|
@chanseokoh That's odd! I tried using Java 11 and for some reason that does appear to work. |
This is due to some popular root CA certs missing or incomplete in some OpenJDK versions. Looks like the very first OpenJDK 9 had an empty cacerts, and then, Oracle open-sourced a set of root certificates issued by the CAs who signed some Oracle agreement to include the certificates in later JDK builds. However, I remember some important CA certs were still missing in OpenJDK 11 Early Access, but maybe this last bit is resolved this for OpenJDK 11 GA, so hopefully everything works out of the box starting from OpenJDK 11. |
With what version of the JDK it is supposed to work? I can't find one that works. |
@rosenk I've gotten it to work with OpenJDK 11. |
@hedvigoscar Already tried that. Dosen't work with the distroless registry |
Hi @rosenk, Does #1216 (comment) work if you use A common root cause is due to proxy problems. Check if you are behind any proxy. If it works, then the problem may be specific to Jib. In that case, please open a new issue with more details: your configs, environment, and detailed logs. Lastly, check #1247 too. |
Description of the issue:
InsecureRegistryException
thrown for all registries (including default where distroless image is hosted)Expected behavior:
mvn jib:build
completes without failing due to secure registries being insecureSteps to reproduce:
mvn jib:build
Environment:
MacOS 10.14, Maven 3.5.4, Java 9.0.4
jib-maven-plugin
Configuration:Log output:
Additional Information:
The text was updated successfully, but these errors were encountered: