简要背景:
大家好,我是一名大学生(代理 10.3.100.211:8080),刚接触 ROR、Git 和 Heroku,一直在关注 Ruby on Rails 教程。我解决了通过 ssh 推送 git repo 的问题,在我的 ~/.ssh/config 文件中使用以下配置(之后它工作得很好):
Host github.com
Hostname ssh.github.com
User git
ProxyCommand corkscrew 10.3.100.211 8080 %h %p
Port 443
Problem:
然而,在接下来的https://devcenter.heroku.com/articles/git https://devcenter.heroku.com/articles/git使用heroku进行在线应用程序部署,我收到以下错误:
$git push heroku master
ssh: connect to host heroku.com port 22: Connection refused
fatal: The remote end hung up unexpectedly
我当前的状态是: $ git remote -v
heroku [email protected] /cdn-cgi/l/email-protection:deep-dusk-1030.git (fetch)
heroku [email protected] /cdn-cgi/l/email-protection:deep-dusk-1030.git (push)
origin [email protected] /cdn-cgi/l/email-protection:shaileshgupta/testapp.git (fetch)
origin [email protected] /cdn-cgi/l/email-protection:shaileshgupta/testapp.git (push)
任何人都可以帮助我将 github.com 与 heroku.com 的设置写入我的 ~/.ssh/config 文件中,以便使用端口 443/22 通过代理后面的 ssh 进行无缝连接。
任何帮助将不胜感激。
更新(更多信息)我尝试了以下设置并收到以下错误:
配置:
Host heroku.com
Hostname ssh.heroku.com
User git
ProxyCommand corkscrew 10.3.100.211 8080 %h %p
Port 443
Error:
$ git push heroku master
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly
另一种配置:
Host github.com, heroku.com
Hostname ssh.github.com
User git
ProxyCommand corkscrew 10.3.100.211 8080 %h %p
Port 443
Error:
$ git push heroku master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly