无法推动大师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。

+0

恩,你没有权限? – Hamish 2011-02-27 23:15:46

+0

部署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

看起来好像heroku不接受你机器的公钥。确保你已将你的公钥寄给了heroku。 Heroku's guide on SSH keys应该有所帮助。

+0

它显示相同的错误.. – sakthig 2011-02-27 23:26:24

+0

您是否能够使用公共密钥SSH连接到其他服务器? – 2011-02-28 00:05:29

+0

我是新手,现在无法访问github和heroku ..我试图在Ubuntu上工作,但它更糟糕.. heroku不会安装在Ubuntu! – sakthig 2011-02-28 13:32:03

你可以尝试在gem install heroku

http://devcenter.heroku.com/articles/keys

+0

此链接帮助我解决了同样的问题。我使用了heroku键来查看我有两个键。然后我输入heroku remove:keys [email protected]两次删除它们 - 然后使用heroku add:keys - 当我尝试推送到heroku时,它工作。 – 2011-12-04 22:06:10

+0

谢谢..原来我在系统上有两个键。 – 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 
+0

不知道'gem ...',但'heroku keys:add'绝对解决了我的问题(upvoted)。 – 2013-10-09 22:15:27

我跑进OSX上一个类似的问题与Heroku的-工具区/ 2.32.8。即使在追踪heroku之后,我仍然没有成功,直到我在默认路径中使用了一个密钥 - IE〜/ .ssh/id_rsa.pub。

+1

将密钥放在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”来解决这个问题。

+0

该解决方案适用于我。我怀疑更好的做法是用用户角色生成密钥,而不是使用root用户。 – mpgarate 2013-09-07 00:34:40