Eclipse中的私钥验证失败错误,用于openshift [英] Private Key authentication failed error in Eclipse for openshift

查看:466
本文介绍了Eclipse中的私钥验证失败错误,用于openshift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Eclipse中,当我尝试从openshift导入现有应用程序时,它会给我以下错误 -



无法克隆存储库。验证失败。
请确保您将私钥添加到ssh首选项。



我已经按照以下步骤 -
1.在Eclipse中,去窗口 - >首选项 - >常规 - >网络连接 - > SSH2 - >密钥管理
2.生成RSA密钥
3.将公钥内容粘贴到opens hift Express帐户中。
4.使用密码保存私钥。



即使在上述步骤之后,克隆GIT repo就会收到错误。



我在Eclipse日志文件中有以下错误 -

 !ENTRY org.jboss.tools.openshift .express.ui 4 0 2012-03-21 10:43:20.161 
!MESSAGE无法克隆资源库。验证失败。
请确保您将私钥添加到ssh首选项。
!STACK 0
org.eclipse.jgit.errors.TransportException:ssh://7261e534e25842aaa353878a6c9af7cf@astofa-astofa.rhcloud.com/~/git/astofa.git/:java.net.ConnectException:连接超时:连接

!ENTRY org.jboss.tools.common.ui 4 0 2012-03-21 10:44:21.838
!MESSAGE操作没有完成在合理的数量的时间

它说操作没有在时间内完成,但我的网络连接工作绝对不错。 p>

我还需要一些其他工具才能继续吗?我是新来的,所以我没有太多的想法。我正在按照以下步骤 -
在Eclipse中设置openshift项目



并停留在步骤 - 5。



请让我知道问题的解决方案。



我安装了OpenSSH并生成了密钥对,那个错误已经消失了。但是,一个新的错误已经开始 -



创建本地git存储库时发生异常。
java.lang.reflect.InvocationTargetException



这与GIT有关。



任何建议将很有帮助。

解决方案

不幸的是,当您使用eclipse ssh首选项创建密钥时,您的密钥将具有错误的权限。它是通过ssh子系统通常不被您接受的用户组(在linux / mac:660上)创建的。在这些情况下,只需更改权限即可使密钥可读(只在linux / mac:600)就足够了。



如果这无助于解决您的问题,那么我们需要进一步调查您的问题,我需要更多有关您的设置的详细信息:
$ b


    <
  • 你有一些ssh配置(/.ssh/config)吗?您的密钥是否列为IdentityFile

  • 可以使用命令行git来检查密钥吗? EGit?

  • 我打赌你在OpenShift Web-UI中添加了OpenShift的密钥?


In Eclipse, when I am trying to import the existing application from openshift, it gives me following error -

Could not clone the repository. Authentication failed. Please make sure that you added your private key to the ssh preferences.

I have followed the below steps- 1. In Eclipse go to Window -> Preferences -> General -> Network Connection -> SSH2 -> Key Management 2. Generate RSA Key 3. Paste the public key content in openshift Express account. 4. Save the private key with passphrase.

Even after following above steps I am getting error while cloning the GIT repo.

I have following error in Eclipse log file -

!ENTRY org.jboss.tools.openshift.express.ui 4 0 2012-03-21 10:43:20.161
!MESSAGE Could not clone the repository. Authentication failed.
Please make sure that you added your private key to the ssh preferences.
!STACK 0
org.eclipse.jgit.errors.TransportException: ssh://7261e534e25842aaa353878a6c9af7cf@astofa-astofa.rhcloud.com/~/git/astofa.git/: java.net.ConnectException: Connection timed out: connect

!ENTRY org.jboss.tools.common.ui 4 0 2012-03-21 10:44:21.838
!MESSAGE Operation did not complete in a reasonnable amount of time

It says operation did not complete within time however my net connection is working absolutly fine.

Do I need some other tools as well to proceed ? I am new to openshift so I do not have much idea. I was following steps mentioned in - Setting up openshift project in Eclipse

and got stuck at step - 5.

Kindly let me know the solution to the issue.

I installed OpenSSH and generated the key pair and that error has gone now. However, a new error has started coming -

An exception occurred while creating local git repository. java.lang.reflect.InvocationTargetException

This is something related to GIT.

Any suggestion would be of great help.

解决方案

Unfortunately, when you create keys with the eclipse ssh preferences your key will have the wrong permissions. It is created in way that makes it readable/writable by your group of users (on linux/mac: 660) which is usually not accepted by the ssh-subsystem. In these cases it is sufficient to correct the permissions to make the key readable for you only (on linux/mac: 600).

If this does not help to solve your problem, then we'll need to further investigate your issue, I'd need some more details about your setup:

  • OS?
  • Are you using external ssh executables (environment variable GIT_SSH is set)?
  • Do you have some ssh configuration (/.ssh/config)? Is your key listed as "IdentityFile"
  • can you cross check your key using command-line git? EGit?
  • I bet you added your key to OpenShift in the OpenShift Web-UI?

这篇关于Eclipse中的私钥验证失败错误,用于openshift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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