部署Rails应用到Heroku出错!!!!
本帖最后由 xianqiang1 于 2012-02-14 18:02:15 编辑 大家好,小弟我最近编了一个基于Rails的个人博客web应用,于是心血来潮的尝试用git将其部置在Heroku托管,可是试了很多次都失败了,首先说报的错是Bad file number,最终在http://rangercyh.blog.51cto.com/1444712/749490这个网上找到了解决方案,说是端口22没开的原故,于是照着上面添加了config文件于.ssh目录下,内容如下:
Host heroku.com
User XXXXXXX
Hostname proxy.heroku.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
port 443
接着照着http://devcenter.heroku.com/articles/rails3官网中说的再次尝试了一下,但在最后一步提交时又出现了一个新的问题:
最后用ssh -v git@heroku.com 测试结果如下:
在google上找了很久都没结果,现在求助于个位大侠,希望能得到解决,我以同样的方式将其提交给github时却是成功的,部署的项目见:https://github.com/lzqwebsoft/websoft-blog
我的是window 7
小子再次拜谢了!!
[最优解释]
回上楼, 后面跟着 type -1 表示没有那文件, type 1 表示有那个文件,
我的文件下只有三个文件, 和你的一样,
但那你的ssh -v显然是没有扫描那个文件
debug1: identity file /home/user/.ssh/identity type -1
我的版本是
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
我试下这个版本看看,,
-t 是测试的意思, 你的测试结果是说“被远程主机关闭了连接”
[其他解释]
因为不想沉!所以顶!!
这个模块的人好冷啊~~~
[其他解释]
是你的ssh生成码没有粘到heroku上。
正常情况应该会像我下面那样
$ ssh -v git@heroku.com
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to heroku.com [50.19.85.132] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/identity type -1
debug1: identity file /home/user/.ssh/id_rsa type 1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
The authenticity of host 'heroku.com (50.19.85.132)' can't be established.
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
[其他解释]
首先感谢你的回帖!回帖一定有分!{^_^}
我的ssh生成码早就上传到heroku的服务器上了呀,我开始时是用的heroku login登录验证,它自动的检测ssh生码key,并上传的呀!下面是我的再次验证:
[其他解释]
ssh -t git@heroku.com
看到什么。。。
[其他解释]
-t 这个参数是干什么的?我测了一下,只有一句话,就是那个错误:
我看了一下你上传成功的反馈信息有这样的一个文件:
debug1: identity file /home/user/.ssh/identity type -1
我的.ssh目录好像不存在它,我按那个git的ssh生成码试了一下,怎地就没有这个文件呢?难道就是因为它少了??
红线标注的为最初生成文件:
[其他解释]
该回复于2012-02-16 13:45:35被版主删除
[其他解释]
OpenSSH_5.3p1, OpenSSL 1.0.0-fips 29 Mar 2010
[其他解释]
受教了,非常谢谢。
我用你的那个版本试一下...