PhpStrom7 SFTP连接失败

时间:2014-08-19 09:46:43

标签: java ide sync sftp phpstorm

我在PhpStorm7.0中遇到部署项目配置的麻烦(我在IDE WebStrom中遇到同样的问题)

当我尝试通过 ftp 进行连接时 - 一切都很好。

但如果选择 sftp - 我有这个错误:

  

测试SFTP连接

     

连接'echuvelev.ihc.ru'

     

Java.lang.ArrayIndexOutOfBoundsException

日志:

    2014-08-19 14:06:29,038 [  73753]   WARN - loyment.ui.WebServerConfigForm - Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/". 
org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://echuvelev.ihc.ru/".
    at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:108)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:102)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:80)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:64)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:698)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:624)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:139)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:103)
    at com.jetbrains.plugins.webDeployment.PublishUtils$1$1.run(PublishUtils.java:115)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:420)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:150)
Caused by: org.apache.commons.vfs2.FileSystemException: Error during processing known-hosts file "/Users/echuvelev/.ssh/known_hosts".
    at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:126)
    at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:97)
    ... 16 more
Caused by: com.jcraft.jsch.JSchException: java.lang.ArrayIndexOutOfBoundsException: 403
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:235)
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:60)
    at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:299)
    at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:122)
    ... 17 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 403
    at com.jcraft.jsch.Util.fromBase64(Util.java:53)
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:221)
    ... 20 more

我尝试重新安装所有IDE(删除缓存,在Library目录中设置),但它对我没有帮助。

有什么想法吗?

p.s ssh在控制台中使用此服务器工作正常,我只在IDE中出现此问题,并且只能使用sftp协议。

1 个答案:

答案 0 :(得分:1)

我在此票证中找到了解决方案youtrack.jetbrains.com/issue/WI-12925#comment=27-580440 它与known_hosts文件存在同样的问题。

<强>解决方案: 尝试备份和删除.ssh / known_hosts文件,并在需要时重新添加主机。