ssh: connect to host heroku.com port 22: Connection timed out
connection, heroku, timeout
Solution
As of November 30, 2021, the SSH Git Transport feature has been deprecated by Heroku and only HTTP transport is supported. The real shutdown of SSH was in March 2022.
You have to reconfigure the repo with :
heroku git:remote -a <app-name>
Official statement from Heroku
If you are using a remote with a different name, e.g. `production` then use
heroku git:remote -a <app-name> -r <remote-name>
Maybe you will have to unset ssh connections on git global config :
git config --global --unset url.ssh://git@heroku/.insteadof
git config --global --unset url.ssh://git@heroku.com/.insteadof
Problem
I am working on Ubuntu 11.10 Local branch of my git-repo is up to date I then wrote following command in terminal: ``` heroku create --stack cedar ``` And this error was printed: ``` Notice: on Wed, 20 June, our default stack will change to Cedar. <Shortened Blog URL> Creating radiant-wind-7413... done, stack is cedar http://radiant-wind-7413.herokuapp.com/ | git@heroku.com:radiant-wind-7413.git Git remote heroku added ``` Blog URL on the Wayback Machine1 All fine till now, then I typed following in terminal: ``` git push heroku master ``` and the following error occured: ``` ssh: connect to host heroku.com port 22: Connection timed out fatal: The remote end hung up unexpectedly ``` 1 Note: Shortened URL were allowed in 2012 but shortened URLs have now been blacklisted