gpt4 book ai didi

SVNKit authentication error E170001, but only when checking out and only on one computer(SVNKit身份验证错误E170001,但仅在签出时且仅在一台计算机上)

转载 作者:bug小助手 更新时间:2023-10-22 18:18:43 26 4
gpt4 key购买 nike



I'm completely stumped by an SVNKit (1.8.5) error that I'm running in to. I'm using the following pattern to build up an Authentication Manager:

我完全被我正在运行的SVNKit(1.8.5)错误难住了。我使用以下模式来构建身份验证管理器:



public static SVNRepository getSvnRepository(String userName, String pass, String repoURL) throws SVNException
{
SVNRepository repository;
repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(repoURL));
ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(userName, pass);
repository.setAuthenticationManager(authManager);

return repository;
}


I use this pattern in several places to make sure that the user can authenticate against the repository, to get a listing of all of the folders in the repository, and even to explore the top level of the subfolders in order to parse a file and build up a dependency graph. All of this succeeds.

我在几个地方使用这种模式,以确保用户可以根据存储库进行身份验证,获得存储库中所有文件夹的列表,甚至可以探索子文件夹的顶层,以便解析文件并构建依赖关系图。所有这些都取得了成功。



But when I attempt to run a checkout, I get an authentication error. Puzzlingly, this error only happens on one computer at our office. Several other computers all running OS X, Windows, and various versions of Ubuntu take no issue with this process and can check out no problem but one particular computer running Ubuntu 12.10 fails hard trying to run the following:

但是,当我尝试运行签出时,会出现身份验证错误。令人困惑的是,这个错误只发生在我们办公室的一台电脑上。其他几台运行OS X、Windows和各种版本的Ubuntu的计算机对此过程没有任何问题,也可以检查出没有问题,但一台运行Ubuntu 12.10的计算机在尝试运行以下程序时失败了:



SVNRepository repository = getSvnRepository(userName, pass, url + "/" + subfolder);
SvnOperationFactory factory = new SvnOperationFactory();
SvnCheckout checkout = factory.createCheckout();
checkout.setSource(SvnTarget.fromURL(repository.getLocation()));
checkout.setSingleTarget(SvnTarget.fromFile(location.resolve(project).toFile()));
checkout.run();


The stack trace:

堆栈跟踪:



org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '<https://[snip]:443>'
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.getFirstAuthentication(DefaultSVNAuthenticationManager.java:186)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:682)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:371)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:359)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:710)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:627)
at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:102)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1032)
at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:175)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:118)
at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:182)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:45)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgAbstractUpdate.checkout(SvnNgAbstractUpdate.java:756)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:16)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgCheckout.run(SvnNgCheckout.java:10)
at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner.run(SvnNgOperationRunner.java:20)
at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1149)
at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)

更多回答

Maybe on that particular machine, there is existing (and incorrect) authentication information in the ~/.subversion folder, and your DefaultSVNAuthenticationManager instance tries to use that? See also the answer for this question: stackoverflow.com/questions/24403997/…

也许在那台特定的计算机上,~/.subversion文件夹中存在现有的(不正确的)身份验证信息,而您的DefaultSVNAuthenticationManager实例试图使用该信息?另请参阅此问题的答案:stackoverflow.com/questions/2440397/…

I am facing the same issue on a Windows 7 machine. On this machine Eclipse, Ant, and svn command line can access the svn server at "https:" with no issues. Interestingly, other workstations work fine. The stacktrace is not that useful. Has anyone have any debugging suggestions?

我在Windows7机器上也面临同样的问题。在这台机器上,Eclipse、Ant和svn命令行可以毫无问题地访问“https:”上的svn服务器。有趣的是,其他工作站运行良好。stacktrace没有那么有用。有人对调试有什么建议吗?

Update: I found something that helped my issue on Windows, kind of: subversion.1072662.n5.nabble.com/… I had to add a jvm argument: -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM

更新:我在Windows上发现了一些有助于解决问题的东西,有点像:subversion。1072662.n5.nabble.com/…我不得不添加一个jvm参数:-Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM

优秀答案推荐

I experienced an issue with this same backtrace recently in Windows. It puzzled me as I had successfully checked out content from other paths within my company via svnkit just fine and couldn't fathom why this specific path was choking via svnkit.

我最近在Windows中遇到了同样的回溯问题。这让我很困惑,因为我已经通过svnkit成功地从公司内的其他路径中检出了内容,我无法理解为什么这个特定的路径会通过svnkit窒息。


I grabbed the source of svnkit to assist with my debugging, and noticed that it was inspecting cached authentication details within the path "C:\Users\gurcei\AppData\Roaming\Subversion\auth\svn.simple\".

我获取了svnkit的源代码来帮助调试,并注意到它正在检查路径“C:\Users\gurcei\AppData\Roaming\Subversion\auth\svn.ssimple\”中缓存的身份验证详细信息。


Inside here was a file named "870755ae945b..." (probably a random number each time), and when I opened it within a text editor, I could see it contained credential details, and it also mentioned the domain-name/realm relating to these credentials.

里面有一个名为“870755ae945b…”的文件(每次可能都是一个随机数),当我在文本编辑器中打开它时,我可以看到它包含凭据详细信息,它还提到了与这些凭据相关的域名/领域。


I noticed that the file used a short domain-name, e.g.:

我注意到该文件使用了一个短域名,例如:


K 15
svn:realmstring
V 43
<https://subversionxy:443> Subversion Realm

This made the penny drop for me on why my failing checkout was choking via svnkit. I had accidentally provided a fully-qualified domain name for the path (e.g., https://subversionxy.my.company.com/...), and I think this meant svnkit couldn't find the credentials in the cache.

这让我明白了为什么我的结账失败会让我窒息。我意外地为路径提供了完全限定的域名(例如。,https://subversionxy.my.company.com/...),我认为这意味着svnkit在缓存中找不到凭据。


Upon switching to the short domain-name (e.g., https://subversionxy/...), the checkout worked for me.

在切换到短域名(例如。,https://subversionxy/...),结账对我有用。


更多回答

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