Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failing to push git to Heroku port 22: bad file number

After creating my rails project, pushing it into the GIT repo, was not able to push it to Heroku. When I run the command:

git push heroku master

I get this error:

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

Am not behind a firewall, proxy or vpn.. I have run

  heroku status

and it is working fine.

I have even made sure ssh is working fine with Git. and run

 ssh -vT [email protected]

and it run successfully

I run

 telnet heroku.com 22 

and it failed

 connecting to heroku.com .. could not open connection to the host, on port 22:Connect failed

Also run and failed

 ssh [email protected]
 ssh: connect to host heroku.com port 22: bad file number
like image 964
Postscripter Avatar asked Jan 02 '13 22:01

Postscripter


1 Answers

The dreaded Bad file number. It's the PC LOAD LETTER of git. It's inscrutable, but almost always a bad key. Try updating your key in heroku and make sure that you are presenting the correct key when trying to connect.

like image 64
Howie Ross Avatar answered Sep 19 '22 15:09

Howie Ross