java com.jcraft.jsch.JSchException:身份验证失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16642204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 23:32:38  来源:igfitidea点击:

com.jcraft.jsch.JSchException: Auth fail

javajsch

提问by mojiayi

While I upload a file from local disk to a remote server,such exception occured: com.jcraft.jsch.JSchException: Auth fail at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215)

当我将文件从本地磁盘上传到远程服务器时,发生了这样的异常: com.jcraft.jsch.JSchException: Auth fail at org.apache.tools.ant.taskdefs.optional.ssh.Scp.execute(Scp.java:215)

I am sure that the userid and password is correct.Because I can upload any file after I restart the upload thread without modify configuration.

我确定用户名和密码是正确的。因为我可以在不修改配置的情况下重新启动上传线程后上传任何文件。

Is it possible that this exception is caused by bad network between my machine and server?Or any other cause?

这个异常有可能是我的机器和服务器之间的网络不好引起的吗?还是其他原因?

回答by Igor

EGit (even latest version 3.3.2) does not work properly with JRE 1.8. Downgrade JRE to 1.7 and this error will disappear.

EGit(即使是最新版本 3.3.2)在 JRE 1.8 中也不能正常工作。将 JRE 降级到 1.7,此错误将消失。