7

创建我的 Rails 项目后,将其推送到 GIT 存储库中,但无法将其推送到 Heroku。当我运行命令时:

git push heroku master

我收到此错误:

ssh: connect to host heroku.com port 22: Bad file number
fatal: The remote end hung up unexpectedly

不在防火墙、代理或 vpn 后面。我已经运行

  heroku status

它工作正常。

我什至确保 ssh 可以在 Git 上正常工作。并运行

 ssh -vT git@github.com

它运行成功

我跑

 telnet heroku.com 22 

它失败了

 connecting to heroku.com .. could not open connection to the host, on port 22:Connect failed

也运行并失败

 ssh git@heroku.com
 ssh: connect to host heroku.com port 22: bad file number
4

1 回答 1

1

可怕的坏文件号。这是 git 的 PC LOAD LETTER。这是不可思议的,但几乎总是一把坏钥匙。尝试在 heroku 中更新您的密钥,并确保在尝试连接时提供正确的密钥。

于 2013-11-05T03:56:06.040 回答