Fork me on GitHub
#tools-deps
<
2019-06-03
>
rickmoynihan17:06:05

I’m running a clojure CLI tool inside travis, and one of the deps is in a private github repo; and it dies with an error like: Error building classpath. [email protected]:company/private-repo.git: Auth fail The build itself is itself inside a private repo too, and travis seems to be able to clone that ok. Any ideas what I might need to do?

dominicm17:06:33

@rickmoynihan I would guess ssh-add or similar

dominicm17:06:59

Is an agent running?

rickmoynihan17:06:22

I would’ve expected travis to already have that setup though, given that one of the first things it does is clone a private GH repo

dominicm17:06:52

Yeah. I wouldn't be certain it's using an agent

dominicm17:06:06

The other thing is, are you using gitlab?

dominicm17:06:18

Okay, then the other bug I'm thinking of doesn't apply

alexmiller17:06:52

clj uses jgit/jsch (not git) so it's definitely possible to have git work on the initial clone and then tools.deps fail to clone a dep repo

alexmiller17:06:59

there are a number of deficiencies in the jgit/jsch stuff (we're on a somewhat old version now too). definitely needs some attention and we're considering either using a newer version or calling out to git or possibly making both available

Alex Whitt20:06:42

Does tools.deps support loading native .so libs via JNI? With leiningen, I had:

:resource-paths ["lib"]
:native-path "%s/lib"
:jvm-opts [~(str "-Djava.library.path=lib/:" (System/getenv "$LD_LIBRARY_PATH"))]
And that did the trick. I've tried a few different things but can't get this working with tools.deps (I get an UnsatisfiedLinkError.)

alexmiller20:06:40

no, this is not yet supported

alexmiller20:06:25

tools.deps can add paths to the classpath and use jvm opts, but it doesn't have support for unpacking or loading native libs

Alex Whitt20:06:01

Dang, alright. Thanks.

dominicm20:06:15

@alex.joseph.whitt what lib is this? Most of the ones I've seen unpack themselves.

alexmiller20:06:19

lein has a thing I think that unpacks native libs

alexmiller20:06:23

I don't know the details

Alex Whitt20:06:28

For now I'll probably try to follow this approach: https://stackoverflow.com/a/28012737/2015090

Alex Whitt20:06:13

It would be real nice if this was just built in

jeroenvandijk22:06:23

@rickmoynihan Almost bedtime, but you can add a user's git keys with circleci and this allows you to use private libs (assuming they are accessible with those keys). I can have a look tomorrow if necessary