clj-commons/clj-ssh

Cannot use agent in the REPL

ftomassetti opened this issue · 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)

What is the code you are trying to run?

(ssh-agent {})

note that ssh works instead

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)

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?