rrr105
rrr105

Reputation: 170

Push to heroku through Proxy server

I have installed Heroku and set up an account but cannot push code for my app onto it, due to a proxy in my university.

I tried using the solution given in this thread and I read this page about getting github to work through a proxy, but I still get an error, which is:

$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)

My .ssh/config file contains:

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

Host git_heroku
  Hostname heroku.com
  User git
  Port 443

The relevant portion of .git/config file:

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

I am pretty sure I have missed something. I hope someone can point out what.

Upvotes: 7

Views: 1121

Answers (2)

VonC
VonC

Reputation: 1324827

You could try and put the ProxyCommand within the Host section:

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

Upvotes: 0

catsby
catsby

Reputation: 11342

Does changing your [remote "heroku"] to this help?

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

Upvotes: 1

Related Questions