创建我的 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
最佳答案
可怕的错误文件编号。这是git的PC LOAD LETTER。这是难以理解的,但几乎总是一把坏 key 。尝试在 heroku 中更新您的 key ,并确保在尝试连接时提供正确的 key 。
关于git - 无法将 git 推送到 Heroku 端口 22 : bad file number,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14130287/