通过代理服务器推送到Heroku

7
我已经安装了Heroku并设置了账户,但由于我所在大学的代理问题,无法将我的应用程序代码推送到Heroku上。
我尝试使用这个线程中提供的解决方案,并阅读这个页面,以使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。请参考此处 - AzizSM
2个回答

1

将你的[remote "heroku"]更改为这个是否有帮助?

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

0

您可以尝试将ProxyCommand放置在Host部分中:

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接