Git Heroku权限被拒绝公钥(添加公钥后) [英] Git Heroku Permission Denied Public Key (after adding public key)

查看:853
本文介绍了Git Heroku权限被拒绝公钥(添加公钥后)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7 64位。我使用最新的Heroku Toolbelt和GitHub Windows应用程序(两天前下载)。两天前,一切都很完美。我安装了PHP和Apache,突然Heroku只是给了我

 权限被拒绝(publickey)。 
致命:无法从远程存储库读取。
请确保您具有正确的访问权限
和存储库

我已经重复完成了这两个命令。

 英雄键:清除
英雄键:添加

我已经删除了我的密钥,并重新制作。我已经生成了一些其他应用程序(puttygen)。我已经通过命令行和Web界面上传它们。我甚至使GitHub Windows应用程序生成一个新的密钥,我上传了一个。我不能从heroku的 git push git clone 。我甚至尝试在本地做一个新的git repo,并添加英雄作为遥控器,然后从那里推。没有运气。



我已经阅读了几十个stackoverflow文章,并尝试提供的每一个解决方案。没有帮助。



编辑:
我不知道是否重要,但我正在制作一个Facebook应用程序通过英雄的帮助页面。我已经从顶部重新启动并且已经停止了,但是我无法通过 git clone 命令。我也从头开始重新安装了英雄工具带。

解决方案

我经历过类似的事情 - 同样的错误信息,设置(最新的英雄工具带,安装了Github Windows客户端)



我认为这是git对您的公钥文件名称的假设。 Github的Windows客户端在$ HOME / .ssh目录中创建github_rsa和github_rsa.pub。如果您只在〜/ .ssh目录中看到这些,请尝试使用标准名称(id_rsa.pub)创建一个新的,使用ssh-keygen而不是Github客户端。



使用ssh-keygen创建一个新的公钥:

  $ ssh-keygen -t rsa 
生成公共/私有rsa密钥对。
输入要保存密钥的文件(/root/.ssh/id_rsa):
输入密码(空密码为无密码):
再次输入相同的密码:
..

此时我现在有id_rsa和id_rsa.pub以及我的github键。 ssh目录。



然后重新上传它:

  $ heroku键:添加〜/ .ssh / id_rsa.pub 
上传ssh公钥...

http://www.whatibroke.com/?p=284 通过< a href =https://stackoverflow.com/questions/12206779/git-push-heroku-master-permission-denied-publickey-fatal-the-remote-end-hung> git push heroku master权限被拒绝(publickey)致命:远程端点意外挂起)


I'm on Windows 7 64-bit. I'm using the latest Heroku Toolbelt and the GitHub Windows App (downloaded two days ago). Two days ago everything was perfect. I installed PHP and Apache, and suddenly Heroku just gives me

Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists

I have done these two commands repeatedly.

heroku keys:clear
heroku keys:add

I've deleted my keys and remade them. I've generated some with other apps (puttygen). I've uploaded them via command line and the web interface. I even made the GitHub Windows app generate a new key, and I uploaded that one. I can't git push or git clone from heroku. I've even tried making a new git repo locally and adding heroku as the remote and then pushing from there. No luck whatsoever.

I've read dozens of stackoverflow posts and tried every single solution offered. None helped.

Edit: I don't know if it matters, but I'm making a Facebook app and working through heroku's help page. I've restarted from the top and worked down, but I can't get past the git clone command. I've also reinstalled the heroku toolbelt from scratch.

解决方案

I experienced something similar - the same error message, from a very similar set up (latest heroku toolbelt, have Github windows client installed)

I think it is an assumption that git makes about the name of your public key file. Github's Windows client creates github_rsa and github_rsa.pub in your $HOME/.ssh directory. If you see only these in your ~/.ssh directory, try creating a new one with the standard name (id_rsa.pub), using ssh-keygen rather than the Github client.

I was able to solve this problem by following these steps.

Create a new public key using ssh-keygen:

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
...

At this point I now have id_rsa and id_rsa.pub as well as the github keys in my .ssh directory.

Then re-upload it:

$ heroku keys:add ~/.ssh/id_rsa.pub
Uploading ssh public key...

(from http://www.whatibroke.com/?p=284 via git push heroku master Permission denied (publickey). fatal: The remote end hung up unexpectedly)

这篇关于Git Heroku权限被拒绝公钥(添加公钥后)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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