0
我試圖在Spring Boot的第8章中按照說明在Heroku上設置Spring Boot應用程序。首先,我使用項目基礎目錄中的命令「git init」將項目目錄初始化爲git存儲庫。然後我發佈了命令「heroku apps:create sbia-mhtdemo」。我得到了以下回應:Heroku錯誤:主機名與服務器證書不匹配
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: hostname was not match with the server certificate (OpenSSL::SSL::SSLError) (Excon::Errors::SocketError)
Backtrace: /Users/mhtbk/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/openssl/ssl-internal.rb:121:in `post_connection_check'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/ssl_socket.rb:86:in `initialize'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/connection.rb:410:in `new'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/connection.rb:410:in `socket'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/connection.rb:122:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/middlewares/mock.rb:42:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/excon-0.31.0/lib/excon/connection.rb:265:in `request'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/client/organizations.rb:31:in `request'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/client/organizations.rb:76:in `get_orgs'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/command/base.rb:53:in `org'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/command/apps.rb:237:in `create'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/command.rb:218:in `run'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/lib/heroku/cli.rb:28:in `start'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/gems/heroku-3.2.2/bin/heroku:17:in `<top (required)>'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/bin/heroku:19:in `load'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/bin/heroku:19:in `<main>'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/bin/ruby_executable_hooks:15:in `eval'
/Users/mhtbk/.rvm/gems/ruby-1.9.2-p320/bin/ruby_executable_hooks:15:in `<main>'
Command: heroku apps:create sbia-mhtdemo
Version: heroku-gem/3.2.2 (x86_64-darwin12.5.0) ruby/1.9.2
我只有我的系統上的一個鍵,它是我用我的Git的帳戶和我的Heroku帳戶相同的密鑰。我也嘗試通過命令「ssh -v [email protected]」來驗證我的密鑰。我得到以下輸出:
OpenSSH_5.9p1, OpenSSL 0.9.8zg 14 July 2015
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: Connecting to heroku.com [50.19.85.156] port 22.
debug1: Connection established.
debug1: identity file /Users/mhtbk/.ssh/id_rsa type 1
debug1: identity file /Users/mhtbk/.ssh/id_rsa-cert type -1
debug1: identity file /Users/mhtbk/.ssh/id_dsa type -1
debug1: identity file /Users/mhtbk/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version endosome
debug1: no match: endosome
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
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/mhtbk/.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/mhtbk/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: key_parse_private_pem: PEM_read_PrivateKey failed
debug1: read PEM private key done: type <unknown>
debug1: read PEM private key done: type RSA
Identity added: /Users/mhtbk/.ssh/id_rsa (/Users/mhtbk/.ssh/id_rsa)
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 = en_US.UTF-8
PTY allocation request failed on channel 0
shell request failed on channel 0
基於行「DEBUG1:發售RSA公鑰......」和「認證成功......」看來關鍵是有效的,雖然上面的服務器主機密鑰指紋與我的公鑰指紋不匹配。我在Heroku的幫助下探索了一下,但我不確定問題到底是什麼。