clj-ssh icon indicating copy to clipboard operation
clj-ssh copied to clipboard

Cannot use agent in the REPL

Open ftomassetti opened this issue 10 years ago • 4 comments

Getting a CompilerException java.lang.ClassNotFoundException: clj-ssh.agent, compiling:(NO_SOURCE_PATH:1:1).

I am running from REPL, started using lein repl. clj-ssh is in my lein profile and ssh is resolved correctly (it fails authentication but I guess that is another issue)

ftomassetti avatar Jul 18 '14 15:07 ftomassetti

What is the code you are trying to run?

hugoduncan avatar Jul 18 '14 16:07 hugoduncan

(ssh-agent {})

note that ssh works instead

ftomassetti avatar Jul 18 '14 16:07 ftomassetti

user=> (clj-ssh.ssh-agent {})

CompilerException java.lang.ClassNotFoundException: clj-ssh.ssh-agent, compiling:(NO_SOURCE_PATH:1:1) user=> (ssh-agent {})

CompilerException java.lang.RuntimeException: Unable to resolve symbol: ssh-agent in this context, compiling:(NO_SOURCE_PATH:1:1)

ftomassetti avatar Jul 18 '14 16:07 ftomassetti

Have you required clj-ssh.ssh or clj-ssh.cli?

(clj-ssh.ssh-agent {}) will give the error you are seeing as you are effectively invoking a class rather than a clojure function. (clj-ssh.ssh/ssh-agent {}) may be what you intended?

hugoduncan avatar Jul 18 '14 16:07 hugoduncan