无法将master推送到heroku
我无法在 github 和 Heroku 中推送使用 git Push,我已经尝试了此建议的各种方法 问题 。请帮助解决这个问题..我在尝试推动时看到以下报告。
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。
I'm unable to push use git push in github as well as heroku, i have tried various methods as suggested on this question . pls help to resolve this problem .. i see the following report while i try to push.
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).
Am using windows 7 .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
输入
gem install heroku
然后将 github 的 rsa 密钥上传到 heroku
一旦你使用命令配置了 heroku 和 github,你的所有代码都会转到 github,然后从那里到 Heroku
,很快你就会看到这些消息
type in
gem install heroku
Then upload rsa key of github to heroku
Once you key in configured with heroku and github with command all your code goes to github and from there to Heroku
and soon you will see these messages
Heroku 似乎不接受您机器的公钥。确保您已将公钥提供给 heroku。 Heroku 的 SSH 密钥指南 应该会有所帮助。
It looks like heroku isn't accepting your machine's public keys. Be sure that you've given your public key to heroku. Heroku's guide on SSH keys should help.
你可以试试这个
http://devcenter.heroku.com/articles/keys
you can try this
http://devcenter.heroku.com/articles/keys
我在 OSX 上使用 heroku-toolbelt/2.32.8 遇到了类似的问题。即使在遵循heroku之后,我还是不成功,直到我在默认路径中使用了密钥 - IE ~/.ssh/id_rsa.pub。
I ran into a similar issue on OSX with heroku-toolbelt/2.32.8. Even after following heroku I was unsuccessful until I used a key in the default path - IE ~/.ssh/id_rsa.pub.
我遇到了同样的问题 - 结果我忘记了 Windows 8 默认情况下不会像 Windows 7 那样以管理员权限启动命令提示符。以管理员身份运行它解决了我的问题。
I had the same issue - turns out I forgot that Windows 8 doesn't start the command prompt with admin privileges by default like Windows 7 did. Running it as administrator fixed my issue.
在 ubuntu 上
sudo su
为我解决了这个问题。当我使用 ssh 生成密钥时,如果您阅读“id_rsa.pub”的内容,文件末尾会出现一个用户名。对我来说,它是“root@pc-name”,但如果没有 sudo su,当前用户名是“username@pc-name”而不是“root@pc-name”。
sudo su
通过切换到“root@pc-name”来解决这个问题。On ubuntu
sudo su
solved it for me.When I used ssh to generate the key, then if you read the contents of "id_rsa.pub" there's a username at the end of the file. For me it was "root@pc-name", but without
sudo su
the current username is "username@pc-name" instead of "root@pc-name".sudo su
solves that by switching to "root@pc-name".如果使用 Windows 和 Cygwin,我必须以管理员权限启动 Cygwin,然后才能推送到 Heroku。
If using Windows and Cygwin, I had to start Cygwin with admin privileges before it would let me push to Heroku.
我遇到了同样的问题。我用 Git Bash 更改 cmd 命令解决了这个问题。在 Git 上完成所有事情。
I faced the same problem. I solved it with change cmd command with Git Bash. Do everything on Git.