gpt4 book ai didi

java - PhpStrom7 SFTP 连接失败

转载 作者:行者123 更新时间:2023-11-30 03:47:05 25 4
gpt4 key购买 nike

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

当我尝试通过 ftp 连接时 - 一切正常。

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

Test SFTP Connection

Connection to '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(删除缓存,在库目录中进行设置),但这对我没有帮助。

有什么想法吗?

p.s ssh 在控制台中与该服务器一起工作正常,我仅在 IDE 中遇到此问题,并且仅在使用 sftp 协议(protocol)时遇到此问题。

最佳答案

我在这张票中找到了解决方案 youtrack.jetbrains.com/issue/WI-12925#comment=27-580440 known_hosts 文件也有同样的问题。

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

关于java - PhpStrom7 SFTP 连接失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25380329/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com