Fork me on GitHub
#leiningen
<
2019-09-16
>
bmaddy21:09:39

Our internal Nexus repository is secured with a self-signed certificate. Does anyone know if there's a way to specify a truststore to use when pulling deps with lein? I'm trying to get around a 'unable to find valid certification path to requested target' error when running lein deps.

danielcompton21:09:19

Can you add it to the installed Java trust store?

danielcompton21:09:34

Can’t remember if that’s a thing or not

danielcompton21:09:46

Lein also has support for this directly:

;; If you configure a custom repository with a self-signed SSL
  ;; certificate, you will need to add it here. Paths should either
  ;; be on Leiningen's classpath or relative to the project root.
  :certificates ["blueant.pem"]
from the sample.project.clj file

Alex Miller (Clojure team)21:09:47

you can add it to the java trust store

👍 4
Alex Miller (Clojure team)21:09:11

that's what Maven would tell you to do

danielcompton21:09:18

If it was me, I’d prefer to add it to the Java trust store, this is a more durable method IMO

bmaddy21:09:08

Oh, I don't know how I missed that :certificates key. I'll do the trust store thing if this ends up working. Thanks you two!