Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21785

Check for changes in folders linked via svn:externals fails due to missing credentials

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • subversion-plugin
    • None
    • Windows 7 x64 for both hosts and slaves, Linux for both hosts and slaves

      Note from the commenters:

      This bug has been resolved in Subversion Plugin 2.3. You just need to reconfigure your jobs. You have to add all SVN Credentials as "Additional Credentials" in the job config with correct realm notation "<proto://server:port> SvnRealmName". Please read the comments below.

      • Find out the SVN realm name on your client like this:
        svn --no-auth-cache --config-dir invalid info proto://host:port/path/to/repo
      • The SVN realm name is set in your SVN Server config svnserve.conf (realm = realm-name). See man pages here.
      • If you are using svn+ssh your realm will be in the "svn+ssh://server-name" format. No port, no pointy brackets, no extra realm name.
      • Add "Additional Credentials" for *all* repositories involved at the checkout - also for repositories which are referenced by SVN externals.

      Original Bug Description:

      We use svn:externals to map folders of the same repository into the project folders. The 2.1 version of the plugin fails to check for changes and reports a "svn: E200015: No credential to try. Authentication failed" error in the stack trace.

      hudson.util.IOException2: revision check failed on https://svn.dummyserver.org/svn/Data/trunk/Dummy
      	at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:189)
      	at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:132)
      	at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:736)
      	at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:897)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:651)
      	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560)
      	at hudson.model.Run.execute(Run.java:1670)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:231)
      Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: OPTIONS /svn/Data/trunk/Dummy failed
      	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:384)
      	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:373)
      	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:361)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:707)
      	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:1020)
      	at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:180)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:118)
      	at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:148)
      	at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:45)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
      	at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
      	at org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner.run(SvnOperationRunner.java:20)
      	at org.tmatesoft.svn.core.wc2.SvnOperationFactory.run(SvnOperationFactory.java:1238)
      	at org.tmatesoft.svn.core.wc2.SvnOperation.run(SvnOperation.java:294)
      	at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:967)
      	at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:872)
      	at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:177)
      	... 11 more
      Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: No credential to try. Authentication failed
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:37)
      	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.cancel(SVNErrorManager.java:32)
      	at org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager.getFirstAuthentication(DefaultSVNAuthenticationManager.java:185)
      	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:694)
      	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)
      	... 29 more
      

          [JENKINS-21785] Check for changes in folders linked via svn:externals fails due to missing credentials

          ps :
          Jenkins ver. 1.647
          svn plugin : 2.5.7

          Fabien Carmagnac added a comment - ps : Jenkins ver. 1.647 svn plugin : 2.5.7

          We can find the realm using curl -I <url_external>

          curl will prompt:
          HTTP/1.1 401 Authorization Required
          Date: <current_date>
          Server: Apache/2.2.15 (CentOS)
          WWW-Authenticate: Basic realm=<SVN_REALM>
          Content-Type: text/html; charset=iso-8859-1

          I added the <SVN_REALM> realm value of WWW-Authenticate: Basic realm in the field Additional Credentials/Realm. That do not solve the problem, still have the job failed when it exists change in one of the externals. All externals are on the same SVN project.

          Bruno Pettorelli added a comment - We can find the realm using curl -I <url_external> curl will prompt: HTTP/1.1 401 Authorization Required Date: <current_date> Server: Apache/2.2.15 (CentOS) WWW-Authenticate: Basic realm=<SVN_REALM> Content-Type: text/html; charset=iso-8859-1 I added the <SVN_REALM> realm value of WWW-Authenticate: Basic realm in the field Additional Credentials/Realm. That do not solve the problem, still have the job failed when it exists change in one of the externals. All externals are on the same SVN project.

          bpetto35, Could you send the config.xml of your job?

          Manuel Recena Soto added a comment - bpetto35 , Could you send the config.xml of your job?

          Bruno Pettorelli added a comment - Manuel, config files for 2 jobs among many failing jobs. https://drive.google.com/open?id=0B3ZI9767SO40cW1DV1BYOTA3RDBwV3hUcmd3WVZsa0d4TURZ https://drive.google.com/open?id=0B3ZI9767SO40VjlHdF9tUTB1VGlxQjJJZFh4TXNON2h4bS1B

          I just went through this whole thing on my install. None of the ways to find the realm worked for me as I'm using svn+ssh.

          Finally enabling the logs in Jenkins on FINE with hudson.scm.CredentialsSVNAuthenticationProviderImpl helped me find the string which was in the "svn+ssh://server-name" format. No port, no pointy brackets, no extra realm name.

          I would suggest we add the svn+ssh info to the howto above.

          That was painful learning experience.

          Channy Tremblay added a comment - I just went through this whole thing on my install. None of the ways to find the realm worked for me as I'm using svn+ssh. Finally enabling the logs in Jenkins on FINE with hudson.scm.CredentialsSVNAuthenticationProviderImpl helped me find the string which was in the "svn+ssh://server-name" format. No port, no pointy brackets, no extra realm name. I would suggest we add the svn+ssh info to the howto above. That was painful learning experience.

          Markus Franke added a comment -

          Dear Channy,

          you saved my day! At least after changing the Realm of the "Additional Credentials" to the simplified form "svn+ssh://server-name" which you provided, it looks quite promising that it finally works for me.

          Best regards and thanks for the thorough analysis.

          Markus Franke added a comment - Dear Channy, you saved my day! At least after changing the Realm of the "Additional Credentials" to the simplified form "svn+ssh://server-name" which you provided, it looks quite promising that it finally works for me. Best regards and thanks for the thorough analysis.

          Hello,

          for me it's works with svn+ssh but not with https.
          I try to add :
          {{additionalCredentials: [
          [realm: 'My Realm SVN',
          credentialsId: 'myId'],
          [realm: 'https://192.168.XX.YY:443',
          credentialsId: 'myId'],
          [realm: 'https://192.168.XX.YY',
          credentialsId: 'myId']
          ]}}
          And i still have:
          {{hudson.util.IOException2: revision check failed on https://192.168.XX.YY/repos/svnflow/project/trunk/server/com.project.server.webapp
          at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208)
          at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138)
          at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725)
          at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
          at hudson.security.ACL.impersonate(ACL.java:213)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
          Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66)
          at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57)
          at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798)
          at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391)
          at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379)
          at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862)
          at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698)
          at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118)
          at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049)
          at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189)
          at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119)
          at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195)
          at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46)
          at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160)
          at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35)
          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.doLog(SVNLogClient.java:968)
          at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873)
          at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194)
          ... 14 more
          Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled.
          at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:728)
          ... 32 more
          Finished: FAILURE}}

          My versions are:

          • Jenkins 2.7.3
          • SVN plugin 2.7.1

          So how, i can help you better? (Maybe I can try to do PR, if i can restart the production jenkins in java remot debug....)

          Guillaume Dufour added a comment - Hello, for me it's works with svn+ssh but not with https. I try to add : {{additionalCredentials: [ [realm: 'My Realm SVN', credentialsId: 'myId'], [realm: 'https://192.168.XX.YY:443', credentialsId: 'myId'], [realm: 'https://192.168.XX.YY', credentialsId: 'myId'] ]}} And i still have: {{hudson.util.IOException2: revision check failed on https://192.168.XX.YY/repos/svnflow/project/trunk/server/com.project.server.webapp at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:208) at hudson.scm.SubversionChangeLogBuilder.run(SubversionChangeLogBuilder.java:138) at hudson.scm.SubversionSCM.calcChangeLog(SubversionSCM.java:725) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:860) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:83) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:73) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) at hudson.security.ACL.impersonate(ACL.java:213) at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:66) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:57) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:798) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:391) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:379) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.performHttpRequest(DAVConnection.java:862) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.exchangeCapabilities(DAVConnection.java:698) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.open(DAVConnection.java:118) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.openConnection(DAVRepository.java:1049) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getLatestRevision(DAVRepository.java:189) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.getRevisionNumber(SvnNgRepositoryAccess.java:119) at org.tmatesoft.svn.core.internal.wc2.SvnRepositoryAccess.getLocations(SvnRepositoryAccess.java:195) at org.tmatesoft.svn.core.internal.wc2.ng.SvnNgRepositoryAccess.createRepositoryFor(SvnNgRepositoryAccess.java:46) at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:160) at org.tmatesoft.svn.core.internal.wc2.remote.SvnRemoteLog.run(SvnRemoteLog.java:35) 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.doLog(SVNLogClient.java:968) at org.tmatesoft.svn.core.wc.SVNLogClient.doLog(SVNLogClient.java:873) at hudson.scm.SubversionChangeLogBuilder.buildModule(SubversionChangeLogBuilder.java:194) ... 14 more Caused by: org.tmatesoft.svn.core.SVNCancelException: svn: E200015: ISVNAuthentication provider did not provide credentials; HTTP authorization cancelled. at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:728) ... 32 more Finished: FAILURE}} My versions are: Jenkins 2.7.3 SVN plugin 2.7.1 So how, i can help you better? (Maybe I can try to do PR, if i can restart the production jenkins in java remot debug....)

          Guillaume Dufour added a comment - - edited

          Hello, I try to reproduce with a unit test directly on my svn server. com.myapp.server contains 2 externals : com.myapp.server.webapp and another one. But the error not occured.
          The changelog file is always empty (<log/>) maybe i must do another previous call to feed it.
          How this following test is different as a checkout directly by jenkins 2 ? :

          {{
          @Test(timeout = 0L)
          public void testCheckoutHttpsWithExternalsAndAuthentification() throws Exception {
          SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(),
          Arrays.<Credentials>asList(
          new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "1-login", null, "mylogin", "mypassword")
          )
          ));

          List<SubversionSCM.ModuleLocation> locations = Arrays.asList(
          new SubversionSCM.ModuleLocation("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", "1-login",".", SVNDepth.INFINITY.getName(), false)
          );
          List<SubversionSCM.AdditionalCredentials> additionalCredentials = Arrays.asList(
          new SubversionSCM.AdditionalCredentials("Realm of SVN","1-login"),
          new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY:443","1-login"),
          new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY","1-login"),
          new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow","1-login"),
          new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server.webapp","1-login")
          );
          SCM scm = new SubversionSCM(locations, new UpdateUpdater(), null, null, "", "", "", "", false, false, additionalCredentials);
          SCMSource source = new SingleSCMSource(null, "https://192.168..XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", scm);
          TaskListener listener = StreamTaskListener.fromStdout();
          // First check fetching of all heads. SCMHeadObserver.Collector.result is a TreeMap so order is predictable:
          assertEquals("[SCMHead

          {'https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server'}

          ]", source.fetch(listener).toString());
          // SCM.checkout does not permit a null build argument, unfortunately.
          Run<?,?> run = r.buildAndAssertSuccess(r.createFreeStyleProject());
          // Retrieval of heads:
          FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds
          1")).child("tmp");
          Launcher launcher = new Launcher.LocalLauncher(listener);
          SCMRevisionState scmRevisionState = scm.calcRevisionsFromBuild(run , ws, launcher, listener);
          assertRevision2(source.fetch(new SCMHead("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server"), listener), "null", source, run, listener, launcher, scmRevisionState);
          }

          private void assertRevision2(@CheckForNull SCMRevision rev, @CheckForNull String expectedFile, @NonNull SCMSource source, @NonNull Run<?,?> run, @NonNull TaskListener listener, Launcher launcher, SCMRevisionState scmRevisionState) throws Exception {
          if (rev == null)

          { assertNull(expectedFile); return; }

          FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds
          1")).child("tmp");
          File changelog = new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds\\1
          changelog");
          source.build(rev.getHead(), rev).checkout(run, launcher, ws, listener, changelog, scmRevisionState);
          FilePath file = ws.child("file");
          assertEquals(expectedFile, file.exists() ? file.readToString() : null);
          }}}

          Guillaume Dufour added a comment - - edited Hello, I try to reproduce with a unit test directly on my svn server. com.myapp.server contains 2 externals : com.myapp.server.webapp and another one. But the error not occured. The changelog file is always empty (<log/>) maybe i must do another previous call to feed it. How this following test is different as a checkout directly by jenkins 2 ? : {{ @Test(timeout = 0L) public void testCheckoutHttpsWithExternalsAndAuthentification() throws Exception { SystemCredentialsProvider.getInstance().setDomainCredentialsMap(Collections.singletonMap(Domain.global(), Arrays.<Credentials>asList( new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, "1-login", null, "mylogin", "mypassword") ) )); List<SubversionSCM.ModuleLocation> locations = Arrays.asList( new SubversionSCM.ModuleLocation("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", "1-login",".", SVNDepth.INFINITY.getName(), false) ); List<SubversionSCM.AdditionalCredentials> additionalCredentials = Arrays.asList( new SubversionSCM.AdditionalCredentials("Realm of SVN","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY:443","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow","1-login"), new SubversionSCM.AdditionalCredentials("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server.webapp","1-login") ); SCM scm = new SubversionSCM(locations, new UpdateUpdater(), null, null, "", "", "", "", false, false, additionalCredentials); SCMSource source = new SingleSCMSource(null, "https://192.168..XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server", scm); TaskListener listener = StreamTaskListener.fromStdout(); // First check fetching of all heads. SCMHeadObserver.Collector.result is a TreeMap so order is predictable: assertEquals("[SCMHead {'https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server'} ]", source.fetch(listener).toString()); // SCM.checkout does not permit a null build argument, unfortunately. Run<?,?> run = r.buildAndAssertSuccess(r.createFreeStyleProject()); // Retrieval of heads: FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds 1")).child("tmp"); Launcher launcher = new Launcher.LocalLauncher(listener); SCMRevisionState scmRevisionState = scm.calcRevisionsFromBuild(run , ws, launcher, listener); assertRevision2(source.fetch(new SCMHead("https://192.168.XX.YY/repos/svnflow/myproject/trunk/server/com.myapp.server"), listener), "null", source, run, listener, launcher, scmRevisionState); } private void assertRevision2(@CheckForNull SCMRevision rev, @CheckForNull String expectedFile, @NonNull SCMSource source, @NonNull Run<?,?> run, @NonNull TaskListener listener, Launcher launcher, SCMRevisionState scmRevisionState) throws Exception { if (rev == null) { assertNull(expectedFile); return; } FilePath ws = new FilePath(new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds 1")).child("tmp"); File changelog = new File("C:\\Users\\gdufour\\AppData\\Local\\Temp\\hudsonFixedtest\\jobs\\test0\\builds\\1 changelog"); source.build(rev.getHead(), rev).checkout(run, launcher, ws, listener, changelog, scmRevisionState); FilePath file = ws.child("file"); assertEquals(expectedFile, file.exists() ? file.readToString() : null); }}}

          So i debug the plugin and i found why. It's because the format of the realm is not just the realm name but the full name with uri like:
          <https://XX.YY.WW.ZZ:PORT> My Realm Name
          So it's my fault. sorry

          Guillaume Dufour added a comment - So i debug the plugin and i found why. It's because the format of the realm is not just the realm name but the full name with uri like: < https://XX.YY.WW.ZZ:PORT > My Realm Name So it's my fault. sorry

          Jesse Glick added a comment -

          I see no reason for this to have been reopened.

          Jesse Glick added a comment - I see no reason for this to have been reopened.

            recena Manuel Recena Soto
            simabeis Marcel Beister
            Votes:
            43 Vote for this issue
            Watchers:
            75 Start watching this issue

              Created:
              Updated:
              Resolved: