git push heroku master权限被拒绝(publickey)。致命的:远端意外挂断 [英] git push heroku master Permission denied (publickey). fatal: The remote end hung up unexpectedly

查看:147
本文介绍了git push heroku master权限被拒绝(publickey)。致命的:远端意外挂断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


$ b $请谅解一下,因为Heroku使用SO作为他们的客户支持(我认为这至少可以说是粗俗的),所以我会尽力保持检查。 b

在过去的五个小时里,我一直在试图让应用程序发布,但总是出现关键错误。我已经阅读了数十篇文章,并在小费后尝试了小费,试图找出Heroku在愚蠢,完全不透明的过程中所处的位置。



我的用例并不难:我为我的heroku应用程序创建了一个新的密钥对。我已将该关键字设置为我的关键字:

 > heroku键
=== travis@xxxx.com键
ssh-rsa AAAAB3NzaC ... avOqfA7ZBd travis@xxxx.com

我可以登录并创建一个应用程序(愚蠢的名字,因为它似乎在创建一个git repo,而不是任何类型的应用程序)没有问题。但是每次 * freaking * time 我尝试推送我的应用程序,我得到:

 > git push heroku master 
权限被拒绝(publickey)。
致命:远程终端意外挂断

我没有深入了解WTF的情况用它;我只是用一种无法追求的方式将我的头撞在键盘上,但希望Google的全能上帝能够回答它。而谷歌并没有回答它(好吧,让我回顾一下,我已经看到了大约十几种方法来回答这个问题)。



对于一个假定的系统很容易,这是一个笑话。我喜欢Heroku的想法,但是在接受了五次我们完成 完成之后,我想也许这是一个错误的选择。

解决方案

网络上有各种解决方案。我会尽量将可用的选项压缩到一篇文章中。步骤1:尝试将公钥添加到Heroku中



$ b


  • $ b

      heroku keys:add〜/ .ssh / id_rsa.pub //或者只是heroku keys:add,它会提示你选择你的一个键


  • 第二步:生成一组新的SSH密钥,然后再次尝试第一步 p>

    https://help.github。 com / articles / generate-ssh-keys


  • 第3步:验证和/或修改您的配置文件

      vim〜/ .ssh / config 

    主机heroku.com
    主机名称heroku.com
    端口22
    IdentitiesOnly是
    IdentityFile〜/ .ssh / id_rsa< ---应该是您的公共SSH密钥
    TCPKeepAlive是
    用户jsmith@gmail.com


  • 第4步:从git中移除heroku remote,重新创建连接,通过heroku cr eate只是新存储库的一个选项。请务必删除您最初尝试创建的旧回购。

      $ git remote rm heroku 
    $ heroku create


  • 第5步:重新安装Heroku工具包

  • / ul>

    Please excuse a bit of frustration, which I will try to keep in check since Heroku is using SO as their customer support (which I think it shoddy to say the least).

    For the last five hours I have been trying to get an application to publish, but invariably something goes wrong with the keys. I've read dozens of articles and tried tip after tip in an effort to figure out where, in the stupid, completely opaque process Heroku is screwing up.

    My use case is not that difficult: I have created a new keypair for my heroku apps. I have set that key to be my key:

      > heroku keys
      === travis@xxxx.com Keys
      ssh-rsa AAAAB3NzaC...avOqfA7ZBd travis@xxxx.com
    

    I can log in and "create" an application (stupid name, since it seems to be creating a git repo, not any sort of app) without problem. But every *freaking* time I try to push my app, I get:

      > git push heroku master
      Permission denied (publickey).
      fatal: The remote end hung up unexpectedly
    

    I have no insight into WTF is going on with it; I'm just stuck banging my head against a keyboard with no recourse but to hope the almighty god of Google can answer it. And google isn't answering it (well, let me take that back, I've seen about a dozen ways to answer this).

    For a system that is supposed to be easy, this is a joke. I like the idea of Heroku, but after taking five our to get absolutely nothing done, I'm thinking maybe it is the wrong choice.

    解决方案

    There are a variety of solutions around the web. I will try to condense the available options into one post. Please try your connection again after every step.

    • Step 1: Attempt adding you public key to Heroku

      heroku keys:add ~/.ssh/id_rsa.pub // or just heroku keys:add and it will prompt you to pick one of your keys
      

    • Step 2: Generate a new set of SSH keys, then attempt the first step again

      https://help.github.com/articles/generating-ssh-keys

    • Step 3: Verify and/or modify your config file

      vim ~/.ssh/config
      
      Host heroku.com
      Hostname heroku.com 
      Port 22 
      IdentitiesOnly yes 
      IdentityFile ~/.ssh/id_rsa    <--- Should be your public SSH key
      TCPKeepAlive yes 
      User jsmith@gmail.com
      

    • Step 4: Remove the heroku remote from git, the recreate the connection, adding the remote via heroku create will only be an option for new repositories. Be sure to delete your old repo that you originally attempted to create

       $ git remote rm heroku
       $ heroku create
      

    • Step 5: Reinstall Heroku Toolkit

    这篇关于git push heroku master权限被拒绝(publickey)。致命的:远端意外挂断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆