clojure-control
clojure-control copied to clipboard
run example (deftask :create-dir []) : no tty present
I am trying to create a folder, using the task as specified in the guide :
(deftask :create-dir []
(if (not (exists? (str (:path @config))))
(ssh (sudo (str "mkdir -p " (:path @config))))))
I get an error :
sudo: no tty present and no askpass program specified
After googling for the error, I get to this SO post :
http://stackoverflow.com/questions/21659637/how-to-fix-sudo-no-tty-present-and-no-askpass-program-specified-error
And I add :ssh-options to my local cluster :
(defcluster :local
:clients [{:host "localhost" :user "nha"}]
:ssh-options "-t")
This time I get :
localhost:ssh: -t test -e /var/dev/clojure-cms
localhost:stderr: Pseudo-terminal will not be allocated because stdin is not a terminal.
localhost:exit: 1
localhost:ssh: -t sudo mkdir -p /var/dev/clojure-cms ;
localhost:stderr: Pseudo-terminal will not be allocated because stdin is not a terminal.
sudo: no tty present and no askpass program specified
Following the trail, I get to this post : http://stackoverflow.com/questions/7114990/pseudo-terminal-will-not-be-allocated-because-stdin-is-not-a-terminal
I try "-t -t", and "-T", none of these work.
localhost:ssh: -t -t test -e /var/dev/clojure-cms
localhost:stderr: ssh: illegal option --
And :
localhost:ssh: -T test -e /var/dev/clojure-cms
localhost:exit: 1
localhost:ssh: -T sudo mkdir -p /var/dev/clojure-cms ;
localhost:stderr: sudo: no tty present and no askpass program specified
localhost:exit: 1
What should I do ?
Note : I am on osx 10.10.5, tried from a bash and zsh shell in case it matters.
I am having this exact same issue. Help, somebody!!!