tmatesoft.svn.core.SVNAuthenticationException:svn:E170001

时间:2016-03-22 17:37:02

标签: maven svn jenkins sonarqube sonarqube-scan

我们正在使用遗留项目(maven)来设置devop。初学者与詹金斯。 Jenkins构建现在没有问题。但是,在将sonarqube与jenkins集成时,我们收到以下错误:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Error when executing blame for file src/main/java/com/acme/acq/scavenger/AssetCmboItem.java
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:100)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:59)
    at org.sonar.batch.scm.ScmSensor.execute(ScmSensor.java:84)
    at org.sonar.batch.sensor.SensorWrapper.analyse(SensorWrapper.java:57)
    at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
    at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
    at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:102)
    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:264)
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:259)
    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:249)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:127)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
    at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
    at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
    at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
    at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.sonar.runner.impl.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
    at com.sun.proxy.$Proxy0.execute(Unknown Source)
    at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
    at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
    at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
    at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:133)
    at org.sonarsource.scanner.cli.Main.execute(Main.java:82)
    at org.sonarsource.scanner.cli.Main.main(Main.java:66)
Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication required for '<http://localhost:80> Subversion Project1 repository'
    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:203)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:716)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:398)
    at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:386)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:720)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:634)
    at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:109)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1044)
    at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.hasCapability(DAVRepository.java:872)
    at org.tmatesoft.svn.core.io.SVNRepository.assertServerIsMergeInfoCapable(SVNRepository.java:787)
    at org.tmatesoft.svn.core.io.SVNRepository.getFileRevisions(SVNRepository.java:756)
    at org.tmatesoft.svn.core.internal.wc16.SVNLogClient16.doAnnotate(SVNLogClient16.java:1389)
    at org.tmatesoft.svn.core.internal.wc16.SVNLogClient16.doAnnotate(SVNLogClient16.java:291)
    at org.tmatesoft.svn.core.internal.wc2.old.SvnOldAnnotate.run(SvnOldAnnotate.java:45)
    at org.tmatesoft.svn.core.internal.wc2.old.SvnOldAnnotate.run(SvnOldAnnotate.java:17)
    at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:21)
    at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1235)
    at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
    at org.tmatesoft.svn.core.wc.SVNLogClient.doAnnotate(SVNLogClient.java:295)
    at org.sonar.plugins.scm.svn.SvnBlameCommand.blame(SvnBlameCommand.java:98)
    ... 34 more

已经看到一些与此错误相关的讨论,但在我们的案例中,没有一个能帮助我们解决此错误,例如,在%APPDATA%\ Subversion \ servers文件中 - 在全局部分中添加了

[global]
# http-proxy-exceptions = *.exception.com, www.internal-site.org
# http-proxy-host = defaultproxy.whatever.com
# http-proxy-port = 7000
# http-proxy-username = defaultusername
# http-proxy-password = defaultpassword
# http-compression = no
# No http-timeout, so just use the builtin default.
# No neon-debug-mask, so neon debugging is disabled.
# ssl-authority-files = /path/to/CAcert.pem;/path/to/CAcert2.pem
#
# Password / passphrase caching parameters:
# store-passwords = no
# store-ssl-client-cert-pp = no
# store-plaintext-passwords = no
# store-ssl-client-cert-pp-plaintext = no
http-auth-types=Basic

我们现在从一个测试盒运行整个设置[subversion,jenkins,sonarqube](Windows 7)。任何指示都将有助于我们继续前进。

谢谢, 圣

2 个答案:

答案 0 :(得分:8)

刚刚发现,通过禁用SCM传感器配置,我们可以避免此错误 enter image description here

但不确定影响(通过禁用责备信息检索),但当前设置按预期工作。

答案 1 :(得分:0)

我面临同样的问题,显然@Kallada 的回答有效,但正如@agabrys 在评论中提到的那样,可能会导致其他一些问题。

所以最好从调用方发送这个标志键。

我在下面使用它作为 Jenkins 脚本的一部分。

mvn sonar:sonar -Dsonar.scm.disabled=True

我希望这可以节省某人的时间。