【问题标题】:Push to heroku through Proxy server通过代理服务器推送到heroku
【发布时间】:2012-10-05 05:06:02
【问题描述】:

我已安装 Heroku 并设置了一个帐户,但由于我所在大学的代理,我无法将我的应用程序代码推送到该帐户上。

我尝试使用this 线程中给出的解决方案,并阅读了this 页面关于让 github 通过代理工作,但我仍然收到一个错误,即:

$git push heroku origin
ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly

$git remote -v
heroku  git_heroku:secret-hamlet-7718.git (fetch)
heroku  git_heroku:secret-hamlet-7718.git (push)
origin  https://github.com/saasbook/hw2_rottenpotatoes.git (fetch)
origin  https://github.com/saasbook/hw2_rottenpotatoes.git (push)

我的 .ssh/config 文件包含:

ProxyCommand corkscrew [proxy_address] [proxy_port] %h %p

Host git_heroku
  Hostname heroku.com
  User git
  Port 443

.git/config 文件的相关部分:

[remote "heroku"]
    url = git_heroku:secret-hamlet-7718.git
    fetch = +refs/heads/*:refs/remotes/heroku/*

我很确定我错过了什么。我希望有人能指出什么。

【问题讨论】:

  • 您可以尝试通过隧道连接到 Heroku。请参考here

标签: git heroku


【解决方案1】:

将您的[remote "heroku"] 更改为此有帮助吗?

[remote "heroku"]
    url = git@heroku:secret-hamlet-7718.git
    fetch = +refs/heads/*:refs/remotes/heroku/*

【讨论】:

    【解决方案2】:

    您可以尝试将 ProxyCommand 放入 Host 部分:

    Host git_heroku
      Hostname heroku.com
      User git
      ProxyCommand corkscrew 10.3.100.211 8080 %h %p
      Port 443
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-29
      • 2022-10-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多