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

Allow to manage SSH keys in settings.xml from Jenkins credentials

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      In maven settings a server entry can be a reference to an SSH key

          <server>
            <id>server001</id>
            <username>my_login</username>
            <privateKey>${user.home}/.ssh/id_dsa</privateKey>
            <passphrase>some_passphrase</passphrase>
          </server>
      

      This is useful for example when you are accessing to git repository in SSH to release the project for exemple. In Jenkins we can create SSH credentials but we cannot inject them in server entries like username/password. The feature should allow to inject the ssh private key path (we should temporarily deploy it on the slave) and passphrase (if required).

      Dominik Bartholdi do you think that it makes sense ?

        Attachments

          Activity

          Hide
          domi Dominik Bartholdi added a comment -

          yeah, that definitely makes sense - but I think the keys should then be temporarily copied to an job (or even run) specific location on the slave - otherwise the keys could be removed by a second job running on the same slave.

          ...PRs welcome

          Show
          domi Dominik Bartholdi added a comment - yeah, that definitely makes sense - but I think the keys should then be temporarily copied to an job (or even run) specific location on the slave - otherwise the keys could be removed by a second job running on the same slave. ...PRs welcome
          Hide
          aheritier Arnaud Héritier added a comment -

          Yes for the key it should be a temporary copy removed at the end of the build.
          But AFAIR it is what you do for config files too?

          Show
          aheritier Arnaud Héritier added a comment - Yes for the key it should be a temporary copy removed at the end of the build. But AFAIR it is what you do for config files too?
          Hide
          domi Dominik Bartholdi added a comment -

          yes, that's true

          Show
          domi Dominik Bartholdi added a comment - yes, that's true
          Hide
          aheritier Arnaud Héritier added a comment -

          ok I will try to come back with a PR in few weeks

          Show
          aheritier Arnaud Héritier added a comment - ok I will try to come back with a PR in few weeks
          Show
          imod Dominik Bartholdi added a comment - implemented with https://github.com/jenkinsci/config-file-provider-plugin/pull/15
          Hide
          aheritier Arnaud Héritier added a comment -

          awesome. Thanks a lot Cyrille Le Clerc and Dominik Bartholdi

          Show
          aheritier Arnaud Héritier added a comment - awesome. Thanks a lot Cyrille Le Clerc and Dominik Bartholdi
          Hide
          imod Dominik Bartholdi added a comment -

          released with version 2.11

          Show
          imod Dominik Bartholdi added a comment - released with version 2.11

            People

            • Assignee:
              domi Dominik Bartholdi
              Reporter:
              aheritier Arnaud Héritier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: