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

Tag this build ignores credentials set up in Jenkins - only works if you have cached credentials in .subversion

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • subversion-plugin
    • Jenkins 1.565.3 with Subversion plugin 2.4.5 on Mac OS X 10.8.5

      If you install Jenkins on a new machine, "Tag this build" will fail because it fails to authenticate (stack trace says "no credential to try"). This happens even though you have set up credentials for the repository correctly in Jenkins, and other operations such as checking out the source and polling are working fine.

      To make it work, you have to login as user "jenkins" and perform some Subversion operation from the command line (for example, creating a tag in the repository). Subversion then prompts you for your password. What happens now depends on how your Subversion client is configured: Subversion will attempt to cache the password for you, for example by storing it in .subversion/svn.simple, or putting it in the Mac's keychain. Once Subversion has successfully cached the password, you can tag builds from Jenkins.

      However, there are various reasons why the password might not be cached. If you installed Jenkins on the Mac using the standard Mac installer, your "jenkins" user will not be a normal user, and will not have a login keychain. So Subversion will not be able to cache the password there. If you have also changed the options in .subversion/servers to disallow caching of plain-text passwords, then there is nowhere left for Subversion to store the password. The command-line Subversion client will still work (it will prompt you for the password every time it runs), but tagging from Jenkins will never work.

          [JENKINS-26668] Tag this build ignores credentials set up in Jenkins - only works if you have cached credentials in .subversion

          Sarah Woodall added a comment - - edited

          This is related to issue https://issues.jenkins-ci.org/browse/JENKINS-24377 and might be the underlying cause of it.

          Sarah Woodall added a comment - - edited This is related to issue https://issues.jenkins-ci.org/browse/JENKINS-24377 and might be the underlying cause of it.

          Sarah Woodall added a comment -

          I created this new report because I'm not sure whether it's the same thing, but I guess it most likely is.

          Sarah Woodall added a comment - I created this new report because I'm not sure whether it's the same thing, but I guess it most likely is.

          Daniel Beck added a comment -

          The workaround presented here will break SVN credentials in Jenkins, as the cached ones take precedence over anything configured in Jenkins – so unless everything you do will only need one username/password, this will break builds.

          Daniel Beck added a comment - The workaround presented here will break SVN credentials in Jenkins, as the cached ones take precedence over anything configured in Jenkins – so unless everything you do will only need one username/password, this will break builds.

          Ville Nummela added a comment -

          jenkins version 1.596.1, plugin version 2.5. Tagging does not work from jenkins - it works fine from command line using jsvn with cached password. I would be quite happy if the workaround worked for me as well, but no...

          Ville Nummela added a comment - jenkins version 1.596.1, plugin version 2.5. Tagging does not work from jenkins - it works fine from command line using jsvn with cached password. I would be quite happy if the workaround worked for me as well, but no...

          Damien Bonvillain added a comment - - edited

          Jenkins 1.580.3 (LTS), tagging is broken with SVN plugin from 2.2 to 2.5 included, server running on Linux. There has been a change in the plugin dependencies I thing, because it worked before the Jenkins upgrade (from a 1.4xx series), even if it was not working properly (in the sense that it didn't always use the proper credentials, at least it was using some credentials).

          Selecting a credential in the combo box seems to have no effect at all on the process.

          Damien Bonvillain added a comment - - edited Jenkins 1.580.3 (LTS), tagging is broken with SVN plugin from 2.2 to 2.5 included, server running on Linux. There has been a change in the plugin dependencies I thing, because it worked before the Jenkins upgrade (from a 1.4xx series), even if it was not working properly (in the sense that it didn't always use the proper credentials, at least it was using some credentials). Selecting a credential in the combo box seems to have no effect at all on the process.

          Just a small fix for everyone who is struggling with the bug: I've fixed it and submitted a pull-request to subversion plugin github: https://github.com/jenkinsci/subversion-plugin/pull/112
          Selecting a credential had indeed no effect, since it was ignored.
          It looks like it will take a while to get this fix to production, but you can build your own version of the plugin with the fix.

          Hope it helps anyone.

          Boris Rozenshteyn added a comment - Just a small fix for everyone who is struggling with the bug: I've fixed it and submitted a pull-request to subversion plugin github: https://github.com/jenkinsci/subversion-plugin/pull/112 Selecting a credential had indeed no effect, since it was ignored. It looks like it will take a while to get this fix to production, but you can build your own version of the plugin with the fix. Hope it helps anyone.

          There are two PR to solve the same bug:

          1. rozboris' PR: https://github.com/jenkinsci/subversion-plugin/pull/112
          2. My PR: https://github.com/jenkinsci/subversion-plugin/pull/121

          It was my fault because I didn't see the rozboris' PR.

          Manuel Recena Soto added a comment - There are two PR to solve the same bug: rozboris ' PR: https://github.com/jenkinsci/subversion-plugin/pull/112 My PR: https://github.com/jenkinsci/subversion-plugin/pull/121 It was my fault because I didn't see the rozboris ' PR.

          There are other ticket more detailed (screenshot and steps to reproduce).

          https://issues.jenkins-ci.org/browse/JENKINS-29225

          Manuel Recena Soto added a comment - There are other ticket more detailed (screenshot and steps to reproduce). https://issues.jenkins-ci.org/browse/JENKINS-29225

            recena Manuel Recena Soto
            sarahwoodall Sarah Woodall
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: