“认证失败”与EGit和GitHub错误 [英] "Auth Failed" error with EGit and GitHub

查看:188
本文介绍了“认证失败”与EGit和GitHub错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Eclipse Helios上安装了EGit插件,我试图用我的GitHub帐号使用它,但是当我尝试配置它时,我会收到一个Auth Failed错误。



我一直在搜索它,但没有运气...这似乎是我的密码短语的一个问题,但AFAIK EGit正在看正确的地方( /home/user/.ssh / id_rsa ),我没有连接到$ code> ssh 或 git 控制台客户端



有些博客说这是URI和Egit的解析器的问题,但我还没有找到解决方案。

解决方案

我的答案可能已经过时,但希望对某人有用。


  1. 在您的Eclipse中,转到 窗口>
    首选项>常规>网络连接>
    SSH2
    (或仅在$中键入SSH2 b $ b首选项窗口过滤框)。
    (DD)我试图加载一个已知的好的id_rsa密钥,以前我从
    推我的存储库从命令行,并且工作正常。
    尝试在第二步中添加键时,我发现两个键的
    长度不同。也许这是EGit
    和eclipse正在呕吐的地方?我生成的github的密钥是2048,
    由Eclipse / EGit生成的密钥长度是1024.不知道SSH
    足够好,看看是否是这个问题。


  2. 密钥管理标签中,按
    生成RSA密钥...按钮。或者,您可以添加注释
    (通常是电子邮件地址)和
    密码到您的密钥。密码短语
    将在GitHub身份验证
    期间使用。


  3. 复制您生成的公钥(在
    框中刚刚生成RSA密钥...
    按钮),并将其添加到您的GitHub
    帐户。

  4. 保存私钥...按钮
    将私人RSA密钥保存到
    文件中。默认情况下,密钥存储在
    SSH2主目录中(请参阅常规
    选项卡)。

!现在你应该可以把你的代码推送到GitHub repo。


I've installed EGit plugin at Eclipse Helios and I'm trying to use it with my GitHub account, but when I try to configure it I get an "Auth Failed" error.

I'd been googling it but no luck... it seems to be a problem with my passphrase but AFAIK EGit is looking at the right place (/home/user/.ssh/id_rsa) and I've no problem in connect by ssh or git console client.

Some blogs says that is a problem with the URI and the Egit's parser but I still haven't found a solution.

解决方案

My answer may be outdated but hopefully it can be useful for someone.

  1. In your Eclipse go to Window > Preferences > General > Network Connections > SSH2 (or just type "SSH2" in preferences window filter box). (DD) I attempted to load a known good id_rsa key, I had previously pushed my repository from the command line, and that worked fine. When attempting to "add" the key in step two, I discovered that the lengths of the two keys were different. Perhaps this is where EGit and eclipse are fowling up? My generated key for github is 2048, key length generated by Eclipse/EGit is 1024. Don't know SSH well enough to see if this is the problem.

  2. In "Key Management" tab press "Generate RSA Key..." button. Optionally you can add comment (usually e-mail address) and passphrase to your key. Passphrase will be used during authentication on GitHub.

  3. Copy your generated public key (in a box just below "Generate RSA Key..." button) and add it to your GitHub account.
  4. Press "Save Private Key..." button to save your private RSA key into file. By default keys are stored in SSH2 home directory (see "General" tab).

That's it! Now you should be able to push your code to GitHub repo.

这篇关于“认证失败”与EGit和GitHub错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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