Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to push to heroku behind a proxy?

Tags:

proxy

heroku

I am using git behind a proxy server at my university. While trying to execute

git push heroku master

I get an error

ssh: connect to host proxy.heroku.com port 22: Bad file number
fatal: The remote end hung up unexpectedly

I had a similar problem when pushing to git earlier, but that was solved using their smart HTTP. From what I've read so far, it seems to be a network problem. How do I fix this? Is there any way to push to heroku using HTTP? (I'm guessing pushing through SSH is causing this problem and that the port 22 is blocked)

like image 356
Ingrid Morstrad Avatar asked Mar 10 '12 17:03

Ingrid Morstrad


People also ask

How do I push directly to heroku?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.

Does heroku use a proxy?

heroku-proxy provides a proxy to the Heroku API for express apps. It is intended for use with node-heroku-bouncer.


1 Answers

Corkscrew is a tool for tunneling SSH through HTTP proxies

Setting up Corkscrew with SSH/OpenSSH is very simple. Adding the following line to your ~/.ssh/config file will usually do the trick (replace proxy.example.com and 8080 with correct values):

ProxyCommand /usr/local/bin/corkscrew proxy.example.com 8080 %h %p

Follow http://www.agroman.net/corkscrew/README

like image 63
Colonel Panic Avatar answered Sep 28 '22 03:09

Colonel Panic