Redhat OpenShift - 连接被拒绝,严重:远端意外挂断

Redhat OpenShift - 连接被拒绝,严重:远端意外挂断

我正在尝试开始使用红帽 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/ 中的内容如下:

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

然后我在尝试执行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/
nc: Proxy error: "HTTP/1.0 403 Forbidden"
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly

如果我尝试直接通过连接远程控制,我以类似的方式收到错误消息。

没有该配置文件

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

使用配置文件

$ 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 客户端工具用于连接,它显示了我拥有的齿轮数量,但它仍然显示类似的错误消息。

没有配置文件:

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)

使用配置文件:

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 公钥并将其粘贴到“公钥”下的 OpenShift 设置中,所以我想这应该不是问题。

怎么样?有什么想法和建议吗?谢谢

答案1

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

  1. 执行rhc sshkey list并记录输出

  2. 然后尝试添加你的公钥并运行rhc sshkey add <give name for key> ~/.ssh/id_rsa.pub

相关内容