eclipse - 克隆 GIT 存储库时出现“Auth Fail”错误
问题描述
我正在尝试使用GitEye软件将 git 存储库克隆到我的Mac机器上。此存储库位于Windows 本地服务器上。我正在尝试使用SSH命令克隆存储库。
最近,我开始面临克隆操作的问题。我收到以下错误消息:
org.eclipse.jgit.api.errors.TransportException: ssh://Admin@192.168.1.106:22/D://Repository/ABC: Auth fail
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:221)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:159)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:100)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$8.run(SourceBranchPage.java:341)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.jgit.errors.TransportException: ssh://Admin@192.168.1.106:22/D://Repository/ABC: Auth fail
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:264)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:162)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:198)
... 4 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:512)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117)
... 8 more
我将不胜感激有关此主题的任何建议和想法。谢谢你。
编辑:
当我尝试从命令行测试 SSH 连接时
Octanes-ABC:~ Octane_XYZ$ ssh Admin@192.168.1.106
Connection closed by 192.168.1.106 port 22
解决方案
我有同样的问题,找不到原因。SSH 工作,本机 git 工作,jgit 失败。解决方法是使用ssh-agent
-ssh-add
也许 jgit 只是不喜欢带密码的私钥。
推荐阅读
- linux - 命令“cp -P”和“cp -d”之间有区别吗?
- python - 从 1 到 n 的值的 x^2 函数的总和
- sql - 如何使用 Amazon Redshift 中的垂直列获取记录
- php - 如何阻止对文件夹中所有文件的直接 URL 访问,但仍允许用户下载它?
- matplotlib - 如何使用 seaborn 仅绘制 y 轴
- reactjs - 使表格的第一列可点击并导航到 reactjs 中的另一个页面
- php - Symfony 在 Secret 中找不到环境变量
- r - 原始数据列在 R 中返回长度为 0
- php - int(6) 返回 Laravel 中内容的开头
- blazor - Blazor 在页面重新加载时失败