19

Heroku deployment works like a charm in at my home.

But my office network restricts ssh which blocks the command "git push heroku master" Is there a way to use a https url of the heroku git repository to push my app.

Kumaresan
  • 335
  • 3
  • 7
  • 1
    After further digging it seems that heroku does not support git over https. The only workaround is to maintain a copy of the project in GitHub or any other repository which supports https. use this repo to work from locations which do not support ssh. For deployment to heroku clone this app and deploy from a firewall free machine. – Kumaresan Jan 09 '12 at 19:42
  • 1
    You can also use Tor as a SOCKS proxy for Git. – Gui Prá Aug 07 '13 at 19:58

4 Answers4

20

You can push to heroku git only through ssh.

Update(per @ryanbrainard comment): HTTP Git is now GA https://blog.heroku.com/archives/2014/12/5/http_git_now_generally_available

Aleksandar Vucetic
  • 14,715
  • 9
  • 53
  • 56
5

This plugin for heroku toolbelt allows you to push over https:

https://github.com/ddollar/heroku-push

supermethod
  • 351
  • 3
  • 8
  • is there a similar thing for heroku run? – Markus Graf Jul 28 '14 at 14:11
  • That uses the Heroku API to push, which I assume still uses SSH? – Rob Grant Aug 20 '14 at 10:32
  • that works for me. I was unable to push throught git (company firewall issue) and with this plugin it works. Great! – Kioko Kiaza Sep 17 '14 at 07:29
  • 1
    This method is [deprecated](https://devcenter.heroku.com/changelog-items/586). Please use [HTTP Git](http://stackoverflow.com/questions/8793282/how-to-access-heroku-git-over-https-behind-firewalls-restricting-ssh/28521579#28521579). – ryanbrainard Feb 14 '15 at 23:51
1

Heroku now supports GIT over HTTP (this is a beta feature). Check https://devcenter.heroku.com/articles/http-git. https://git.heroku.com/{app-name}.git will be the URL for your repo.

Aman
  • 4,786
  • 1
  • 17
  • 17
1

Heroku now has full HTTP Git support and is the default option for new apps. If you want to change an existing app from SSH Git to HTTP Git, run:

$ heroku git:remote

and then push like normal:

$ git push heroku master

For details, see the documentation.

ryanbrainard
  • 5,918
  • 35
  • 41