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

Username/password credentials can not be used with git

XMLWordPrintable

    • 0.2.0

      I'm trying to use username/password credentials with git in a pipeline like this:

       

      pipeline {
        agent any
        stages {
          stage('Example') {
            steps {
              git credentialsId: 'git-creds', url:'https://github.com/jenkinsci/aws-secrets-manager-credentials-provider-plugin.git'
            }
          }
        }
      }

       

      The Git plugin will first test if the credentials are a ssh key, and then try to extract the key. Only if the credentials are not a ssh key will it test if it is a username/password.

      The issue is that 'AwsCredentials' are implementing both 'StandardUsernamePasswordCredentials' and 'SSHUserPrivateKey'.

      The solution would be (I think) to have different subclasses for each.

            chriskilding Chris Kilding
            peterfich Peter Fich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: