gpt4 book ai didi

clojure - Leiningen:试图在没有 TLS 的情况下使用不安全的 HTTP 存储库

转载 作者:行者123 更新时间:2023-12-03 20:30:39 48 4
gpt4 key购买 nike

我正在尝试通过 Enlive tutorial .

当我尝试 lein depslein run在克隆的仓库中,我遇到了这个问题:

Tried to use insecure HTTP repository without TLS.

最佳答案

最近版本的 Leiningen 禁用了不安全的依赖项下载。来自 FAQ :

Q: I got Tried to use insecure HTTP repository without TLS, what is that about?

A: This means your project was configured to download dependencies from a repository that does not use TLS encryption. This is very insecure and exposes you to trivially-executed man-in-the-middle attacks. In the rare event that you don't care about the security of the machines running your project or can ensure that the only http traffic is going out over a trusted network, you can re-enable support for unsafe repositories by putting this in your project.clj file:

;; never do this
(require 'cemerick.pomegranate.aether)
(cemerick.pomegranate.aether/register-wagon-factory!
"http" #(org.apache.maven.wagon.providers.http.HttpWagon.))

It's also possible you have a dependency which includes a reference to an insecure repository for retrieving its own dependencies. If this happens it is strongly recommended to add an :exclusion and report a bug with the dependency which does this.


覆盖 project.clj 中不安全的 HTTP 存储库 URL :
我可以克隆 enlive-tutoriallein deps如果我在 enlive-tutorial/project.clj 中覆盖以下存储库 URL,则成功,只需将协议(protocol)更改为 HTTPS:
:mirrors {"clojure" {:url "https://build.clojure.org/releases/"}
"clojure-snapshots" {:url "https://build.clojure.org/snapshots/"}}
出现 Moustache是试图通过 HTTP 拉取其依赖项的传递依赖项。

关于clojure - Leiningen:试图在没有 TLS 的情况下使用不安全的 HTTP 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48603851/

48 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com