使用svn over ssh时,SCM Sensor因E170001而失败

Jak*_*ski 5 ssh svnkit sonar-runner sonarqube sonarqube5.1

由于声纳切换到使用SVNKit,我无法将责备分析用于使用工作副本svn+ssh.它失败了:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project example: Error when executing blame for file src/main/java/com/acme/Foo.java: svn: E170001: Authentication required for 'svn@svn+ssh://svn.acme.com' 
Run Code Online (Sandbox Code Playgroud)

svn从命令行调用时,该命令可正常工作,也可连接到ssh svn@svn.acme.com成功.我在Eclipse中使用SVNKit和这个存储库它也工作正常(虽然我不得不告诉它在哪里寻找私钥).

当我试图调试声纳转轮执行时,我看到私钥没有设置:

myPreviousAuthentication    SVNSSHAuthentication  (id=392)  
    myAgentProxy    null    
    myIsPartial false   
    myIsStorageAllowed  false   
    myKind  "svn.ssh" (id=387)  
    myPassphrase    null    
    myPassword  (id=608)    
    myPortNumber    -1  
    myPrivateKeyFile    null    
    myPrivateKeyValue   null    
    myURL   SVNURL  (id=345)    
    myUserName  "jbochenski" (id=610)   
myPreviousErrorMessage  SVNErrorMessage  (id=388)   
    dontShowErrorCode   false   
    myChildErrorMessage null    
    myErrorCode SVNErrorCode  (id=614)  
    myMessage   "Credentials rejected by SSH server." (id=613)  
    myObjects   Object[0]  (id=616) 
    myThrowable null    
    myType  0   
Run Code Online (Sandbox Code Playgroud)

URL,用户名和密码都是正确的,但正如您所看到myPrivateKeyFile的那样null.

我已经尝试MAVEN_OPTS='-Dsvnkit.ssh2.key=/home/acme/.ssh/id_rsa'按照SVNKit文档设置私钥路径,但它没有任何效果.

如果在分析的另一个工作副本上运行此https分析工作正常,进一步确认它是ssh身份验证的问题.

Jul*_*eam 3

这确实是一个缺失的功能。我创建了以下票证:https ://jira.sonarsource.com/browse/SONARSCSVN-9

您介意测试该插件的更新版本吗: https://github.com/SonarSource/sonar-scm-svn/releases/download/1.3-rc1/sonar-scm-svn-plugin-1.3-SNAPSHOT.jar

您应该能够传递其他参数(或在 UI 中设置它们):

-Dsonar.svn.privateKeyPath=<path to private key>
-Dsonar.svn.passphrase.secure=<optional passphrase>
Run Code Online (Sandbox Code Playgroud)

直接在拉取请求中报告任何成功/问题,以免污染 SO: https: //github.com/SonarSource/sonar-scm-svn/pull/4