SVNkit-SVNAuthenticationException

本文介绍了如何解决在使用 SVN 时遇到的 E170001 认证异常,特别是针对在 Eclipse 中使用 SVN 插件时,无法保存密码并频繁出现认证失败的问题。通过在 Eclipse 启动参数中添加特定参数可以有效解决这个问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一个奇怪的认证问题:svn: E170001

异常堆栈:
org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '<https://192.168.57.217:443> ��ʹ�����˺ŵ�¼����ʽ��hs\***'
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:47)
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.authenticationFailed(SVNErrorManager.java:41)
	at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getNextAuthentication(DefaultSVNAuthenticationManager.java:218)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:660)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:365)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:353)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:708)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:628)
	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:103)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1016)
	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.checkPath(DAVRepository.java:219)
	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteDiffSummarize.doDiffURLURL(SvnRemoteDiffSummarize.java:127)
	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteDiffSummarize.run(SvnRemoteDiffSummarize.java:49)
	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteDiffSummarize.run(SvnRemoteDiffSummarize.java:33)
	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:291)
	at org.tmatesoft.svn.core.wc.SVNDiffClient.doDiffStatus(SVNDiffClient.java:3223)
	at org.tmatesoft.svn.core.wc.SVNDiffClient.doDiffStatus(SVNDiffClient.java:1588)
	at com.xxx.patchgen.svn.SVNOperator.getDiffFiles(SVNOperator.java:88)
	at com.xxx.patchgen.test.Test.main(Test.java:11)

Reason:
摘自某网站:
AlexanderKitaev wrote
Hello, 

Might it be that your server uses NTLM or Negotiate authentication method? 

If so, it may make sense to put the following into jsvn script (I 
assume you use 1.3.6 version): 

EXTRA_JVM_ARGUMENTS="-Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM" 

NTLM authentication might not be supported by SVNKit in all 
environments, and Negotiate one requires JDK to be configured to 
support it (see 
http://www.syntevo.com/smartsvn/techarticles.html?page=configuration.kerberos-over-spnego
for how to configure it). Option above will force SVNKit to prefer 
simple "Basic" authentication method in case it is advertised by the 
server. 

解决:



注:该方法同样适用于解决在eclipse中使用svn插件时,无法保存密码,频繁认证失败问题:

只需在eclipse的启动参数中加入上述参数即可。


评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值