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

Credentials helper does not work for BasicSSHUserPrivateKey

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      What I did:

      [...]
      environment {
        CREDENTIALS = credentials("CREDENTIAL_ID")
      }
      [...]
      steps {
        sh "echo $CREDENTIALS"
      }

      What I expected:

      The value of the private key echoed in the Jenkins log. Or at least *** if the plugin hides it.

      What I got:

      [Pipeline] End of Pipeline
      org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: No suitable binding handler could be found for type com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey. Supported types are StandardUsernamePasswordCredentials,FileCredentials,StringCredentials. 

        Attachments

          Activity

          Hide
          allan_burdajewicz Allan BURDAJEWICZ added a comment - - edited

          There is not support for credentials binding of SSH Credentials in the environment block of declarative pipeline. The Pipeline Model Definition would need to implement a CredentialsBindingHandler for SSH Credentials.

          Show
          allan_burdajewicz Allan BURDAJEWICZ added a comment - - edited There is not support for credentials binding of SSH Credentials in the environment block of declarative pipeline. The Pipeline Model Definition would need to implement a CredentialsBindingHandler for SSH Credentials.
          Hide
          abayer Andrew Bayer added a comment -

          Thanks, Allan BURDAJEWICZ! This is merged, and will be in the next release (1.3.7) (though there may be a 1.3.7-beta-2 first to make sure another fix doesn't cause problems)

          Show
          abayer Andrew Bayer added a comment - Thanks, Allan BURDAJEWICZ ! This is merged, and will be in the next release (1.3.7) (though there may be a 1.3.7-beta-2 first to make sure another fix doesn't cause problems)

            People

            • Assignee:
              allan_burdajewicz Allan BURDAJEWICZ
              Reporter:
              ccaraivan Costin Caraivan
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: