Heroku的权限被拒绝(publickey)致命:无法读取远程存储库的问题 [英] Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

查看:570
本文介绍了Heroku的权限被拒绝(publickey)致命:无法读取远程存储库的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我搜索了很多小时,最终寻找解决方案来解决我看似容易解决的问题。这并不是说我的搜索没有任何结果,它是我的搜索发现了许多不同的解决方案 - 其中一个都没有奏效。



无论如何,我无法推动,拉,或从我的Mac Heroku存储库中获取。每次尝试都会给我(仿佛它在嘲笑我)以下错误:

lockquote

'Permission denied(publickey)。致命:无法从远程
储存库读取数据。'


我试过(并重新尝试过)以许多不同的方式。正如我所说的,在过去的两天里,我花了大量时间寻找答案。以下是我尝试过的一些内容:


  • heroku键:清除后跟随heroku键:添加

  • 使用'ssh-keygen -t rsa'重新生成一个ssh密钥
  • 清除我的.ssh目录,接着是heroku密钥:clear,然后生成一个ssh key

  • 在heroku上删除我的应用程序并重新创建一个(幸运的是没有太多内容)



  • 我可以从我的GitHub存储库中读取,因此我知道这不是网络连接(pinging heroku也可以)。作为临时解决方案(我希望不会变成永久解决方案),我已登录到我的Ubuntu Amazon AWS ec2实例。从Heroku拉出和推出完美。出于这个原因,我仍然觉得问题在于我的Mac上的ssh密钥。这两个键都显示在我的Heroku帐户下。是否在关键问题的最后的电子邮件地址?编辑:我可以推拉从GitHub罚款(但我不使用ssh,但是),为什么不是Heroku?



    在这一点上,我愿意尝试任何事情。谢谢!

    解决方案

    我只是想分享一下,我找到了自己问题的答案。
    $ b

    写出我的问题使我更加清楚,并且进一步调查了我认为我的问题在哪里:ssh密钥



    原来我是对的。问题不在于密钥本身,而在于我没有将它添加到本地Mac的已知ssh密钥列表中。所以,尽管我的Heroku帐户上传了正确的密钥,但我的Mac无法使用它进行身份验证,因为它无法在我的计算机上找到该密钥。解决方案?

      ssh-add〜/ .ssh / id_rsa 
    #并确认它已被添加到已知的按键列表
    ssh-add -l

    我想列举< a href =https://help.github.com/articles/error-permission-denied-publickey =noreferrer> https://help.github.com/articles/error-permission-denied-publickey 是一个很好的参考。


    I've searched around for many hours on end looking to a solution to my seemingly easy-to-fix problem. It's not that my search turned up nothing, it's that my search turned up so many different solutions -none of which have worked.

    Anyways, I am simply unable to push, pull, or fetch from my Heroku repository from my Mac. Every attempt gives me (as if it's mocking me) the following error:

    'Permission denied (publickey). fatal: Could not read from remote repository.'

    I've tried (and re-tried) to fix it in many different ways. As I've said, I've spent a good chunk of the last two days searching around for an answer. Here are some of the things I've tried:

    • heroku keys:clear followed by heroku keys:add
    • Regenerating an ssh key on my own with 'ssh-keygen -t rsa'
    • Clearing out my .ssh directory, followed by heroku keys:clear, followed by generating an ssh key
    • Deleting my app on heroku and recreating one (fortunately not much was on there)

    I can fetch from my GitHub repository fine, so I know it's not network connectivity (pinging heroku also works).

    As a makeshift solution (that I hope doesn't turn into a permanent one), I've logged in to my Ubuntu Amazon AWS ec2 instance. Pulling and pushing to and from Heroku works perfectly. For this reason, I still feel as if the problem lies with the ssh key on my Mac. Both keys show up under my Heroku account. Does the email address at the end of the key matter?

    EDIT: I can push and pull from GitHub fine (I'm not using ssh, however), so why not Heroku?

    At this point I'm willing to try anything. Thanks!

    解决方案

    I just thought I'd share that I found the answer to my own question.

    Writing out my problem made it even more clear to me, and I further investigated into where I thought my problem lay: the ssh key

    Turns out I was right. The issue wasn't with the key itself, but rather that I had not added it to my local Mac's list of known ssh keys. So even though my Heroku account had the correct key uploaded, my Mac could not authenticate with it because it could not find that key on my computer. The solution?

    ssh-add ~/.ssh/id_rsa
    #and, to confirm it's been added to the known list of keys
    ssh-add -l
    

    I would like to give credit to https://help.github.com/articles/error-permission-denied-publickey for being a good reference.

    这篇关于Heroku的权限被拒绝(publickey)致命:无法读取远程存储库的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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