【发布时间】:2012-05-11 16:54:25
【问题描述】:
简要背景:
嗨,我是一名大学生(在代理 10.3.100.211:8080 之后),刚接触 ROR、Git 和 Heroku,并且一直在关注 Ruby on Rails 教程。我使用 ~/.ssh/config 文件中的以下配置解决了通过 ssh 推送 git repo 的问题(之后它工作得很好):
Host github.com
Hostname ssh.github.com
User git
ProxyCommand corkscrew 10.3.100.211 8080 %h %p
Port 443
问题:
但是,在关注 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 git@heroku.com:deep-dusk-1030.git (fetch)
heroku git@heroku.com:deep-dusk-1030.git (push)
origin git@github.com:shaileshgupta/testapp.git (fetch)
origin git@github.com:shaileshgupta/testapp.git (push)
任何人都可以帮助我将 github.com 的设置写入我的 ~/.ssh/config 文件中,以便使用 PORT 443/22 通过代理后面的 ssh 进行无缝连接。
我们将不胜感激。
更新(更多信息) 我尝试了以下设置并收到以下错误:
配置:
Host heroku.com
Hostname ssh.heroku.com
User git
ProxyCommand corkscrew 10.3.100.211 8080 %h %p
Port 443
错误:
$ 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
错误:
$ git push heroku master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
【问题讨论】:
-
所以...您是否需要与访问
heroku.com相同的代理配置来访问github.com? -
我试过了,但它显示以下错误:$ git push heroku master 错误:找不到存储库。致命:远端意外挂断。
-
使用 ssh.heroku.com 作为主机名有什么问题吗? heroku 是否也使用 ssh.heroku.com 作为主机名,因为 github 使用 ssh.github.com 作为主机名?
-
嘿伙计们,有人可以为这个问题投票以得到答案吗? @larsks?