【发布时间】:2022-07-09 21:45:14
【问题描述】:
我在 macOS Big Sur 上使用 EAA 作为我的公司 VPN。
每当我运行 sbt 时,我都会得到这个错误堆栈跟踪。
> sbt clean compile
[info] Loading global plugins from /Users/shril/.sbt/0.13/plugins
[info] Loading project definition from /Users/shril/Documents/repos/my_repos/AudiencePayloadSpark/project
[error] Server access Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.10/sbt_0.13/0.14.10/ivys/ivy.xml
[error] Server access Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.10/sbt_0.13/0.14.10/ivys/ivy.xml
[error] Server access Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target url=https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.10_0.13/0.14.10/sbt-assembly-0.14.10.pom
[warn] module not found: com.eed3si9n#sbt-assembly;0.14.10
[warn] ==== typesafe-ivy-releases: tried
[warn] https://repo.typesafe.com/typesafe/ivy-releases/com.eed3si9n/sbt-assembly/scala_2.10/sbt_0.13/0.14.10/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.10/sbt_0.13/0.14.10/ivys/ivy.xml
[warn] ==== local: tried
[warn] /Users/shril/.ivy2/local/com.eed3si9n/sbt-assembly/scala_2.10/sbt_0.13/0.14.10/ivys/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.10_0.13/0.14.10/sbt-assembly-0.14.10.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.eed3si9n#sbt-assembly;0.14.10: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
我已尝试导入证书并添加到我的钥匙串。但没有任何帮助。
openssl x509 -in <(openssl s_client -connect repo.typesafe.com:443 -prexit 2>/dev/null) -out ~/repo-typesafe.crt
sudo keytool -importcert -file ~/repo-typesafe.crt -alias repo.typesafe.com -keystore /Users/shril/.sdkman/candidates/java/current/jre/lib/security/cacerts -storepass changeit
我的java版本是openjdk版本“1.8.0_332”,我使用sdkman。
【问题讨论】:
-
你不应该为 SBT 做任何事情来使用这些存储库,因为 HTTPS 证书应该已经被你的系统/Java默认认为是有效的。
-
也许您使用了某种代理,或者您的 VPN 操纵了呈现给您的 HTTPS 证书?
-
我的公司设置包括 Akamai EAA 客户端。但我尝试将其关闭并重新运行 sbt。还是不行。
标签: scala ssl-certificate sbt