Intellij 无法从 git 中获取

min*_*der 18 ssh git intellij

我已经克隆了一个现有的 git 存储库。当我使用命令行拉取时,Git 工作正常。但是,当我尝试从 Intellij 执行相同操作时,它说

Fetch failed. Fatal : Could not read from remote repository.
Run Code Online (Sandbox Code Playgroud)

VCS 控制台日志显示:

git fetch --progress --prune origin
java.lang.RuntimeException: Invocation failed Server returned invalid Response.
    at org.jetbrains.git4idea.ssh.GitSSHXmlRpcClient.askPassword(GitSSHXmlRpcClient.java:176)
    at org.jetbrains.git4idea.ssh.SSHMain.authenticate(SSHMain.java:265)
    at org.jetbrains.git4idea.ssh.SSHMain.start(SSHMain.java:157)
    at org.jetbrains.git4idea.ssh.SSHMain.main(SSHMain.java:137)
Caused by: java.io.IOException: Server returned invalid Response.
    at org.apache.xmlrpc.LiteXmlRpcTransport.sendRequest(LiteXmlRpcTransport.java:243)
    at org.apache.xmlrpc.LiteXmlRpcTransport.sendXmlRpc(LiteXmlRpcTransport.java:90)
    at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:72)
    at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
    at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
    at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
    at org.jetbrains.git4idea.ssh.GitSSHXmlRpcClient.askPassword(GitSSHXmlRpcClient.java:170)
    ... 3 more
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)

我正在使用 ssh 密钥对进行身份验证。我很感激这方面的任何帮助。

min*_*der 38

对于 IntelliJ 13/14,

  1. 单击文件-> 设置。键盘快捷键是Ctrl+ Alt+ S
  2. 搜索“版本控制”
  3. 在“版本控制”下选择“Git”
  4. 在 SSH 可执行文件下拉菜单中,选择 Native

  • 这对我不起作用.. (8认同)
  • 这也适用于在 Win7 Pro 上遇到相同问题的同事,但这是一种解决方法,而不是解决方案。您知道为什么它在 IDEA 13.0 中有效,而在 13.1 中不再有效吗?在我的机器上(也是 Win7 Pro、IDEA 13.1.1 Ultimate),它与集成的 SSH 配合得很好。 (2认同)