Cannot push git to remote repository: (SSH error)

前端 未结 3 1795
深忆病人
深忆病人 2020-12-16 19:25

When I attempt to push to my heroku.com remote git repository, i get this message:

ssh: connect to host heroku.com port 22: Connection refused
相关标签:
3条回答
  • 2020-12-16 20:11

    It seems ssh-server wasn't working or host was offline. I think it was temporally trouble.

    I'm trying now:

    telnet heroku.com 22
    Trying 174.129.212.2...
    Connected to heroku.com (174.129.212.2).
    Escape character is '^]'.
    SSH-2.0-OpenSSH_5.1p1 Debian-5pgsql1
    

    Anyway you can diagnose doing ssh -v git@heroku.com (or -vv)

    0 讨论(0)
  • 2020-12-16 20:12

    Connection refused is a TCP error message saying that that server isn't running a service on that port. In this case, perhaps heroku.com's SSH server wasn't running.

    If you haven't given them your key, or you use the wrong private key, ssh will say something like this:

    frank@roke$ ssh git@heroku.com
    Permission denied (publickey).
    
    frank@roke$ ssh -i ~/.ssh/roke-frank.priv git@heroku.com
    Permission denied (publickey).
    

    (And the above messages indicate that right now heroku's SSH server is indeed running.)

    Since you're not able to connect to the same server to which I can, perhaps there's a firewall issue. Are you behind a NAT? Does your gateway permit connections to port 22 on remote machines?

    That machine runs a web server too, so try telnet heroku.com 80 to see if you can connect to that machine at all.

    0 讨论(0)
  • 2020-12-16 20:13

    You need push your key to heroku.

    Because heroku and github are two distinct service. They don't share your key.

    0 讨论(0)
提交回复
热议问题