gradle sync 失败 "PKIX path building failed" and "unable to find valid certification path to requested target"

  • 我是在 gradle sync 的时候遇到这个问题, 导致 sync 失败, 从而不能更新线上 maven 包, 导致 idea 飘红

  • gradle sync 报错如下

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Relevant discussions can be found on the Internet at:
...
Caused by: org.gradle.api.UncheckedIOException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Cause: unable to find valid certification path to requested target
  • 我遇到这个问题纯属是 Charles 开了 MacOS 代理, 导致证书校验失败的问题, 将 Charles 的 MacOS Proxy 关闭就好了(windows 应该也关闭电脑代理差不多)
posted @ 2021-12-24 11:56  throw_new_NullPointe  阅读(1452)  评论(0编辑  收藏  举报