rhc ssh [没有系统SSH可用]错误

nmk*_*nan 6 git ssh ssh-keys openshift openshift-enterprise

我想在我的cmd中查看我的openshift应用程序日志.我试过了:
rhc ssh appname

那个时候我得到了:

No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.
Run Code Online (Sandbox Code Playgroud)

我的系统已经ssh key.so我该如何解决这个问题?

Pau*_*gas 11

如果您安装了Git for Windows 1,那么您可以尝试类似于:

rhc ssh --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe -a <appname>

例如

rhc ssh --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe -a myawesomeapp

笔记

  1. 请参阅https://git-scm.com/download/winhttps://git-for-windows.github.io/


Von*_*onC 6

你需要确保:

  • 你在cmd会话中HOME定义了(set HOME检查它的值的类型:它必须是C:\Users\yourLogin,因为ssh需要查找键%HOME%\.ssh)
  • 您的ssh.exe父文件夹在引用中%PATH%,或者您可以键入:

    rhc ssh -ssh "c:\prgs\git\PortableGit-2.8.3-64-bit\usr\bin\" -a appname
    
    Run Code Online (Sandbox Code Playgroud)

替换c:\prgs\git\PortableGit-2.8.3-64-bit为Git for Windows的实际安装路径.

最简单的解决方案是将git\usr\bin文件夹(包括ssh.exe)添加到PATH环境变量中.