执行 rhc setup 时出错 - 发生意外错误:“<!doctype"处的字符无效 [英] Error executing rhc setup - An unexpected error occurred: invalid character at "<!doctype "
问题描述
执行<代码>后rhc setup 然后输入我的主机名我总是收到这个错误信息
After Executing > rhc setup
and then entering my hostname i always get this error message
我已经完成的步骤:
1- 安装 Ruby 1.9.3
1- installed Ruby 1.9.3
2- 使用 gem 安装 rhc gem install rhc
2- installed rhc using gem gem install rhc
3- 执行<代码>>rhc设置
推荐答案
这似乎是某种错误.
但是,还有另一种方法可以手动生成 SSH 公私钥对并将它们上传到 OpenShift
But, there is another way to manually generate SSH public-private key pairs and upload them to OpenShift
1- 生成新的 SSH 密钥
C:\> ssh-keygen
它会询问您将密钥文件保存在哪里,只需按Enter"-> 这将在C:\Users\YOU\.ssh"中生成名称为id_rsa"的密钥对当要求输入密码时也按 Enter 将其保留为空
It will ask you where to save the key files just press "Enter" -> this will generate key-pairs with name "id_rsa" in "C:\Users\YOU\.ssh" also Press Enter when asked for passphrase to keep it empty
2- 将您的公钥上传到 OpenShift
C:/>rhc sshkey add id_rsa C:\Users\YOU\.ssh\id_rsa.pub
然后它会询问您在 OpenShift 上的凭据,完成后您的公钥现在会上传到 OpenShift
It will then ask you for your credentials on OpenShift, once done your public key is now uploaded to OpenShift
3- 配置 SSH 以在连接到您的 APP 时使用生成的私钥
a- 确保您有一个指向C:/Users/YOU/.ssh"的环境变量HOME",如果没有则创建一个
a- Make sure you have an environment variable "HOME" pointing to "C:/Users/YOU/.ssh", if not create one
b-打开"C:/Users/YOU/.ssh/"如果找到配置文件打开它,如果没有通过运行以下命令创建一个:
b- open "C:/Users/YOU/.ssh/" if you find config file open it , if not create one by running the following command:
touch config
现在将以下几行添加到配置文件中:
Now add the following lines to config file:
Host ChooseAName
HostName APPName-NameSpace.rhcloud.com
IdentityFile ~\.ssh\id_rsa.pub
保存并关闭
4- 正在连接到您的应用:
首先,获取使您能够远程连接到 rhcloud 服务器上的应用程序的命令,您可以使用 OpenShift Web 控制台获取它
First, Get the command that enables you to connect remotely to your app on rhcloud server , you can get it using the OpenShift web console
在命令行中输入该命令,您将通过安全外壳连接到 rhcloud 上的 APP
enter that to you command line and you will be connected trough a secure shell to you APP on rhcloud
这篇关于执行 rhc setup 时出错 - 发生意外错误:“<!doctype"处的字符无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!