Home > Blockchain >  CircleCI deployments to Heroku fail: SSH Connection timed out
CircleCI deployments to Heroku fail: SSH Connection timed out

Time:04-09

I have a CircleCi deployment that's been working for a few years. I last attempted it March 8 and it worked. But now it's failing on this step.

I've contacted CircleCi about it, and they say it's related to the March 15 GitHub SSH deprecation. I don't see how that's possible. I can't telnet to heroku.com:22 from my local machine, or from any other virtual servers I have access to. If you can't reach the port, it doesn't matter which key you have or don't have, right? It's TCP/IP.

It's definitely curious that the March 15 deprecation occurred between March 8 and 30th, I've gone through this enter image description here

CodePudding user response:

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

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://[email protected]/.insteadof

CodePudding user response:

Adding a few environment variables to CircleCi, creating a ~/.netrc file and and switching to HTTP seems to be working:

echo "machine git.heroku.com login ${HEROKU_USERNAME} password ${HEROKU_TOKEN}" > ~/.netrc
git remote add heroku https://git.heroku.com/our-project.git
  • Related