Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push to heroku through Proxy server

Tags:

git

heroku

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.

like image 752
rrr105 Avatar asked Oct 15 '12 08:10

rrr105


People also ask

Does heroku use proxy?

By default, heroku-proxy will proxy all requests to /api/* of any method to api.heroku.com via https . You can override the default options by passing an object into the function returned by the heroku-proxy module: app.

How do I push work 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.

How do I host a heroku proxy?

Follow these simple steps to create a proxy server on Heroku: Step 1: Setting up a local repository. Clone your remote repository to the local directory. Now cd into your cloned repository and run the command npm install to install all node dependencies into your project.

Why heroku push fail?

This error means that the upstream repository has made commits that would be lost if you were to push. First do a "git pull" to merge, and then push again. Save this answer.


1 Answers

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

[remote "heroku"]
    url = git@heroku:secret-hamlet-7718.git
    fetch = +refs/heads/*:refs/remotes/heroku/*
like image 103
catsby Avatar answered Sep 18 '22 21:09

catsby