rhc -ssh无法在openshift中连接到我的应用程序

时间:2014-08-15 07:43:08

标签: ruby openshift openshift-client-tools

我正在尝试执行此命令:

c:\openshift>rhc ssh --ssh "C:\openshift" -a demo

putty.exe位于c:\ openshift和' demo'是我在openshift中的应用程序名称。但为什么我收到此错误消息。它是否说它找不到putty.exe文件?

C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands/ssh.rb:44:in `ex
ec': No such file or directory - C:\openshift (Errno::ENOENT)
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands/ssh
.rb:44:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands.rb:
285:in `execute'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/commands.rb:
276:in `block (3 levels) in to_commander'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:180:in `call'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:180:in `call'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/c
ommand.rb:155:in `run'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/r
unner.rb:421:in `run_active_command'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/command_runn
er.rb:73:in `run!'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/commander-4.2.0/lib/commander/d
elegates.rb:8:in `run!'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/lib/rhc/cli.rb:37:in
 `start'
        from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rhc-1.24.4/bin/rhc:20:in `<top
(required)>'
        from C:/Ruby200/bin/rhc:23:in `load'
        from C:/Ruby200/bin/rhc:23:in `<main>'

3 个答案:

答案 0 :(得分:2)

我得到了同样的错误。作为解决方法,我开始使用Putty。它完美地运作:

此视频展示了如何正确设置腻子:

https://developers.openshift.com/en/managing-remote-connection.html#download-the-putty-installer

答案 1 :(得分:1)

我通过将ssh.exe复制到另一个文件夹(以便ssh.exe的路径不包含空格)解决了同样的问题,然后使用--ssh switch指定了对ssh.exe的FULL PATH:

C:\>rhc ssh --ssh c:\ssh\ssh.exe myapp

答案 2 :(得分:0)

尝试使用UNIX方式指定路径名:

rhc ssh --ssh "C:/openshift" -a demo