【问题标题】:ssh: connect to host heroku port 22: Connection refusedssh:连接到主机 heroku 端口 22:连接被拒绝
【发布时间】:2015-02-01 15:37:51
【问题描述】:

我正在尝试将 Rails 应用程序推送到 heroku,但它不断给我这个错误:

ssh: connect to host 107.21.95.3 port 22: Connection refused
fatal: Could not read from remote repository.

这在本周早些时候在公共 wifi 位置和私人 wifi 位置都有效。我看过ssh-connect-to-host-herokugit-push-heroku-master。通过这两个答案,我卸载并重新安装了 Heroku Toolbelt,向 heroku 添加了一个新的 SSH 密钥,并在 heroku 中创建了一个新的应用程序来推送。

当我使用ssh -T heroku.comssh -vT heroku.com时,我分别得到:

ssh: connect to host 107.21.95.3 port 22: Connection refused

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/christinaleuci/.ssh/config
debug1: /Users/christinaleuci/.ssh/config line 2: Applying options for heroku.com
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to 107.21.95.3 [107.21.95.3] port 22.
debug1: connect to address 107.21.95.3 port 22: Connection refused
ssh: connect to host 107.21.95.3 port 22: Connection refused

【问题讨论】:

    标签: ruby-on-rails ruby git heroku ssh


    【解决方案1】:

    我在键和 Heroku 方面遇到了很多问题。我开始使用Heroku Accounts,这让它变得容易多了。确保您的公钥列在您的 account under SSH keys here 中。

    顺便说一句,ssh -v git@heroku.com 在我使用 Heroku 帐户时失败,但我可以毫无问题地使用我的帐户。

    【讨论】:

      【解决方案2】:

      我遇到了同样的错误,我发现 SSH 在我的办公室被阻止了。如果您不能通过 SSH 连接到任何可能是您的问题的地方,但如果您可以通过 SSH 连接到不是 Heroku 的地方,我不确定。

      【讨论】:

      • 当我 ssh git@github.com 收到此 shell 访问错误:PTY allocation request failed on channel 0 Hi ChristinaLeuci! You've successfully authenticated, but GitHub does not provide shell access. Connection to ssh.github.com closed.
      猜你喜欢
      • 1970-01-01
      • 2018-09-21
      • 1970-01-01
      • 1970-01-01
      • 2017-12-01
      • 2013-06-24
      • 2020-02-13
      • 2017-01-19
      • 2018-10-15
      相关资源
      最近更新 更多