lein ring uberjar:PKIX 路径构建失败?
lein ring uberjar : PKIX path building failed?
我无法从我的本地计算机 运行 "lein ring uberjar"。我收到以下错误:
Could not find artifact ring-server:ring-server:jar:0.5.0 in central (https://repo1.maven.org/maven2/)
Could not transfer artifact ring-server:ring-server:jar:0.5.0 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not transfer artifact ring-server:ring-server:pom:0.5.0 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not transfer artifact ring:ring:pom:1.6.1 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
我认为这与 ssl 有关,但我不确定如何修复它。有办法重置证书吗?
这是我的 project.clj 的样子:
(defproject app
:dependencies [
[org.clojure/clojure "1.10.0"]
[org.clojure/tools.logging "0.4.0"]
[org.clojure/tools.cli "0.3.5"]
[org.clojure/data.json "0.2.6"]
[clj-http "3.9.1"]
[clj-time "0.14.2"]
[mysql/mysql-connector-java "5.1.38"]
[org.slf4j/slf4j-log4j12 "1.7.25"]
[log4j/log4j "1.2.17" :exclusions [javax.mail/mail
javax.jms/jms
com.sun.jmdk/jmxtools
com.sun.jmx/jmxri]]
[metosin/compojure-api "1.1.11"]
[metosin/ring-swagger "0.26.1"]
[compojure "1.6.0"]
[cheshire "5.8.0"]
[ring "1.6.3"]
[ring/ring-json "0.4.0"]
[ring-logger "0.7.7"]
[environ "1.1.0"]
[korma "0.4.3"]
[blackwater "0.0.9"]
[prismatic/schema "1.1.7"]
[siili/humanize "0.1.1"]
[ring-cors "0.1.12"]
[commons-io "2.0"]
[buddy/buddy-sign "3.0.0"]
[byte-transforms "0.1.4"]
]
:ring {:handler app.api.handler/app}
:source-paths ["src"]
:resource-paths ["resources"]
:test-paths ["test/unit"
"test/features"]
:profiles {:default [:local]
:uberjar {:aot :all}
:local {:cucumber-feature-paths ["test/features"]
:plugins [
[lein-ring "0.12.1"]
[com.siili/lein-cucumber "1.0.7"]
[lein-cloverage "1.0.10"]
[lein-kibit "0.1.6"]
[lein-cloverage "1.0.10"]
[lein-try "0.4.3"]
[nightlight/lein-nightlight "1.0.0"]
[jonase/eastwood "0.2.3"]
[cider/cider-nrepl "0.16.0"]
]
}
}
)
我认为我的 JVM 的 CA 设置出现问题,我可以通过以下方式解决此问题:
- 正在通过浏览器下载丢失的 .crt 文件。
- 正在将 .crt 文件添加到密钥库。
keytool -import -trustcacerts -file [.crt file path] -alias [alias] -keystore $JAVA_HOME/lib/security/cacerts
- 正在检查 .crt 文件肯定已添加到密钥库中
keytool -list -keystore $JAVA_HOME/lib/security/cacerts
- 重新运行
lein ring uberjar
我无法从我的本地计算机 运行 "lein ring uberjar"。我收到以下错误:
Could not find artifact ring-server:ring-server:jar:0.5.0 in central (https://repo1.maven.org/maven2/)
Could not transfer artifact ring-server:ring-server:jar:0.5.0 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not transfer artifact ring-server:ring-server:pom:0.5.0 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could not transfer artifact ring:ring:pom:1.6.1 from/to clojars (https://repo.clojars.org/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
我认为这与 ssl 有关,但我不确定如何修复它。有办法重置证书吗?
这是我的 project.clj 的样子:
(defproject app
:dependencies [
[org.clojure/clojure "1.10.0"]
[org.clojure/tools.logging "0.4.0"]
[org.clojure/tools.cli "0.3.5"]
[org.clojure/data.json "0.2.6"]
[clj-http "3.9.1"]
[clj-time "0.14.2"]
[mysql/mysql-connector-java "5.1.38"]
[org.slf4j/slf4j-log4j12 "1.7.25"]
[log4j/log4j "1.2.17" :exclusions [javax.mail/mail
javax.jms/jms
com.sun.jmdk/jmxtools
com.sun.jmx/jmxri]]
[metosin/compojure-api "1.1.11"]
[metosin/ring-swagger "0.26.1"]
[compojure "1.6.0"]
[cheshire "5.8.0"]
[ring "1.6.3"]
[ring/ring-json "0.4.0"]
[ring-logger "0.7.7"]
[environ "1.1.0"]
[korma "0.4.3"]
[blackwater "0.0.9"]
[prismatic/schema "1.1.7"]
[siili/humanize "0.1.1"]
[ring-cors "0.1.12"]
[commons-io "2.0"]
[buddy/buddy-sign "3.0.0"]
[byte-transforms "0.1.4"]
]
:ring {:handler app.api.handler/app}
:source-paths ["src"]
:resource-paths ["resources"]
:test-paths ["test/unit"
"test/features"]
:profiles {:default [:local]
:uberjar {:aot :all}
:local {:cucumber-feature-paths ["test/features"]
:plugins [
[lein-ring "0.12.1"]
[com.siili/lein-cucumber "1.0.7"]
[lein-cloverage "1.0.10"]
[lein-kibit "0.1.6"]
[lein-cloverage "1.0.10"]
[lein-try "0.4.3"]
[nightlight/lein-nightlight "1.0.0"]
[jonase/eastwood "0.2.3"]
[cider/cider-nrepl "0.16.0"]
]
}
}
)
我认为我的 JVM 的 CA 设置出现问题,我可以通过以下方式解决此问题:
- 正在通过浏览器下载丢失的 .crt 文件。
- 正在将 .crt 文件添加到密钥库。
keytool -import -trustcacerts -file [.crt file path] -alias [alias] -keystore $JAVA_HOME/lib/security/cacerts
- 正在检查 .crt 文件肯定已添加到密钥库中
keytool -list -keystore $JAVA_HOME/lib/security/cacerts
- 重新运行
lein ring uberjar