【问题标题】:Private Key authentication failed error in Eclipse for openshiftEclipse 中用于 openshift 的私钥身份验证失败错误
【发布时间】:2012-03-27 23:59:38
【问题描述】:

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

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

我已按照以下步骤操作- 1. 在 Eclipse 中转到 Window -> Preferences -> General -> Network Connection -> SSH2 -> Key Management 2.生成RSA密钥 3. 粘贴openshift Express账户中的公钥内容。 4. 使用密码保存私钥。

即使按照上述步骤操作,我在克隆 GIT 存储库时仍会出错。

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

!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

它说操作没有在时间内完成,但是我的网络连接完全正常。

我是否还需要一些其他工具才能继续?我是openshift的新手,所以我不太清楚。我正在按照 - Setting up openshift project in Eclipse

在第 5 步卡住了。

请告诉我问题的解决方案。

我安装了 OpenSSH 并生成了密钥对,现在该错误已经消失了。然而,一个新的错误已经开始出现 -

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

这与 GIT 有关。

任何建议都会有很大帮助。

【问题讨论】:

    标签: java eclipse git openshift


    【解决方案1】:

    不幸的是,当您使用 eclipse ssh 首选项创建密钥时,您的密钥将拥有错误的权限。它的创建方式使其可以被您的用户组(在 linux/mac:660 上)读取/写入,这通常不被 ssh 子系统接受。在这些情况下,只需更正权限以使密钥仅对您可读(在 linux/mac 上:600)。

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

    • 操作系统?
    • 您是否使用外部 ssh 可执行文件(已设置环境变量 GIT_SSH)?
    • 您有一些 ssh 配置 (/.ssh/config) 吗?您的密钥是否列为“IdentityFile”
    • 您可以使用命令行 git 交叉检查您的密钥吗? EGit?
    • 我敢打赌,您已在 OpenShift Web-UI 中将密钥添加到 OpenShift?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-16
    • 2015-04-20
    • 2014-04-16
    • 1970-01-01
    • 1970-01-01
    • 2015-12-01
    • 1970-01-01
    相关资源
    最近更新 更多