无法推动大师heroku
我无法推动在github以及heroku使用git推,我已经尝试过各种方法,如在question建议。请帮助解决这个问题..我看到下面的报告,而我试图推动。无法推动大师heroku
D:\My\weblog>git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
D:\My\weblog>ssh -v [email protected]
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。
此链接帮助我解决了同样的问题。我使用了heroku键来查看我有两个键。然后我输入heroku remove:keys [email protected]两次删除它们 - 然后使用heroku add:keys - 当我尝试推送到heroku时,它工作。 – 2011-12-04 22:06:10
谢谢..原来我在系统上有两个键。 – baash05 2012-07-24 06:33:11
类型,然后上传github上的RSA密钥对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
不知道'gem ...',但'heroku keys:add'绝对解决了我的问题(upvoted)。 – 2013-10-09 22:15:27
我跑进OSX上一个类似的问题与Heroku的-工具区/ 2.32.8。即使在追踪heroku之后,我仍然没有成功,直到我在默认路径中使用了一个密钥 - IE〜/ .ssh/id_rsa.pub。
将密钥放在id_rsa默认空间中是我可以做的*唯一*的事情,以使其工作。谢谢! – 2013-03-09 15:40:29
如果使用Windows和Cygwin,我必须先启用Cygwin和管理员权限,然后才能让我推送到Heroku。
我面临同样的问题。我用Git Bash修改了cmd命令来解决它。在Git上做所有事情。
我有同样的问题 - 事实证明,我忘记了Windows 8没有像Windows 7那样默认启用管理员权限的命令提示符。以管理员身份运行修复了我的问题。
在ubuntu上sudo su
为我解决了它。
当我使用ssh生成密钥时,如果你阅读“id_rsa.pub”的内容,那么在文件末尾有一个用户名。对我来说,它是“root @ pc-name”,但没有sudo su
,当前用户名是“username @ pc-name”而不是“root @ pc-name”。 sudo su
通过切换到“root @ pc-name”来解决这个问题。
该解决方案适用于我。我怀疑更好的做法是用用户角色生成密钥,而不是使用root用户。 – mpgarate 2013-09-07 00:34:40
恩,你没有权限? – Hamish 2011-02-27 23:15:46
部署heroku代码时可能发生[Permission denied(publickey))的重复。致命:远程端意外挂断](http://stackoverflow.com/questions/4269922/permission-denied-publickey-when-deploying-heroku-code-fatal-the-remote-end) – Nakilon 2012-01-15 00:54:16