我无法在 github 和 heroku 中使用 git push 进行推送,我已经尝试了在此 question 上建议的各种方法.请帮助解决这个问题.. 我在尝试推送时看到以下报告。
D:\My\weblog>git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
D:\My\weblog>ssh -v git@heroku.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to heroku.com [50.16.232.130] port 22.
debug1: Connection established.
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debia
n-5pgsql1
debug1: match: OpenSSH_5.1p1 Debian-5pgsql1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'heroku.com' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /.ssh/identity
debug1: Trying private key: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
我正在使用 Windows 7。
最佳答案
输入 gem install heroku
然后将github的rsa key上传到heroku
$ heroku keys:add
Uploading ssh public key /Users/adam/.ssh/id_rsa.pub
一旦你输入配置了 heroku 和 github 的命令,你所有的代码都会转到 github,然后从那里转到 Heroku
git push heroku master
很快你就会看到这些信息
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
关于git - 无法将 master 推送到 heroku,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5136744/