Redhat的OpenShift – 连接拒绝致命:远程端意外挂断

我试图开始使用Redhat的OpenShiftJBoss 7服务器墨盒,但正如我想做一个git克隆我得到:

$ git clone ssh://username_from_openshift@application_name-host_name.rhcloud.com/~/git/application_name.git/ /development/repos/openshift/ Initialized empty Git repository in /development/repos/openshift/.git/ ssh: connect to host application_name-host_name.rhcloud.com port 22: Connection refused fatal: The remote end hung up unexpectedly 

现在我在一家公司做这个,我正在使用它的代理来访问这台机器上的互联网。 我正在运行Linux CentOS版本6.5(最终)

我尝试在〜/ .ssh /中添加一个“config”文件 ,内容如下:

 Host application_name-host_name.rhcloud.com ProxyCommand nc -X connect -x my_company_proxy.com:8080 %h %p ServerAliveInterval 10 

然后在尝试执行git clone命令时收到此消息:

 $ git clone ssh://username_from_openshift@application_name-host_name.rhcloud.com/~/git/application_name.git/ /development/repos/openshift/ Initialized empty Git repository in /development/repos/openshift/.git/ nc: Proxy error: "HTTP/1.0 403 Forbidden" ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly 

如果我尝试通过SSH直接连接,我收到类似的错误消息。

没有该configuration文件

 $ ssh username_from_openshift@application_name-host_name.rhcloud.com ssh: connect to host application_name-host_name.rhcloud.com port 22: Connection refused 

使用configuration文件

 $ ssh username_from_openshift@application_name-host_name.rhcloud.com nc: Proxy error: "HTTP/1.0 403 Forbidden" ssh_exchange_identification: Connection closed by remote host 

我也尝试使用rhc设置(OpenShift客户端工具进行连接,它显示了我有的齿轮数量,但它仍然给出类似的错误消息。

没有configuration文件:

 An SSH connection could not be established to application_name-host_name.rhcloud.com. Your SSH configuration may not be correct, or the application may not be responding. Connection refused - connect(2) (Errno::ECONNREFUSED) 

使用configuration文件:

 An SSH connection could not be established to application_name-host_name.rhcloud.com. Your SSH configuration may not be correct, or the application may not be responding. connection closed by remote host (Net::SSH::Disconnect) 

现在我也在我的机器上生成了我的ssh公钥,并将其粘贴到“Public Keys”下的OpenShift Settings中,所以我猜这不应该是问题。

好? 任何想法和build议? 谢谢

这些错误很可能是因为您的公共ssh密钥没有正确关联到您的帐户。 尝试执行以下操作

  1. 执行rhc sshkey list并logging输出

  2. 然后尝试添加您的酒吧密钥购买运行rhc sshkey add <give name for key> ~/.ssh/id_rsa.pub