【问题标题】:Cannot deploy Rails application on Heroku无法在 Heroku 上部署 Rails 应用程序
【发布时间】:2016-06-23 14:27:15
【问题描述】:

我已经构建了一个 Rails 应用程序,我想将它部署在 heroku 上。我可以在本地机器上运行 Web 应用程序。 当我输入命令时:git push heroku master 我收到以下错误消息:

git push heroku master
ssh: connect to host heruko.com port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

似乎是连接错误。所以我尝试了:

sh -v git@heroku.com
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to heroku.com [50.19.85.156] port 22.
debug1: Connection established.
debug1: identity file /Users/myname/.ssh/id_rsa type 1
debug1: identity file /Users/myname/.ssh/id_rsa-cert type -1
debug1: identity file /Users/myname/.ssh/id_dsa type -1
debug1: identity file /Users/myname/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version endosome
debug1: no match: endosome
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad
debug1: Host 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /Users/myname/.ssh/known_hosts:6
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/myname/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to heroku.com ([50.19.85.156]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = fr_FR.UTF-8
PTY allocation request failed on channel 0
shell request failed on channel 0

这里可以看到认证成功了。我不明白为什么我不能推动 heroku 并部署我的应用程序。

这里是远程: git远程-v

heroku  git@heruko.com:aqueous-plateau-17182.git (fetch)
heroku  git@heruko.com:aqueous-plateau-17182.git (push)
origin  git@bitbucket.org:pracede/hubapp.git (fetch)
origin  git@bitbucket.org:pracede/hubapp.git (push)

你有什么想法或建议吗?

【问题讨论】:

  • 你给heroku添加了ssh密钥了吗?
  • @Pracede - 运行 heroku keys 并检查添加的密钥是否正确。并检查作为远程添加的heroku git存储库git remote -v
  • @LHH 我添加了 ssh 密钥。
  • @VenkatCh 如何查看添加的密钥是否正确。我的测试是尝试连接 ssh 并且认证成功

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


【解决方案1】:

你的 git 遥控器有错字:

git@heruko.com:aqueous-plateau-17182.git

这是heroku,不是heruko :)

【讨论】:

    猜你喜欢
    • 2020-02-20
    • 2018-10-30
    • 2020-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-22
    • 2018-04-11
    相关资源
    最近更新 更多