2

我正在尝试执行此命令:

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>'
4

3 回答 3

2

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

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

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

于 2015-09-04T10:25:50.103 回答
1

我通过将 ssh.exe 复制到不同的文件夹(以便 ssh.exe 的路径不包含空格)解决了同样的问题,然后使用 --ssh 开关指定 ssh.exe 的完整路径:

C:\>rhc ssh --ssh c:\ssh\ssh.exe myapp
于 2017-08-28T20:44:45.440 回答
0

尝试指定路径名的UNIX方式:

rhc ssh --ssh "C:/openshift" -a demo
于 2014-08-15T07:54:03.530 回答