Hi Guys
Looking for some assistant here:
stage('Get Terraform Repo') {
steps {
echo 'Getting Terraform Repo....'
checkout scm
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'devops_user_password', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']])
{
echo USERNAME
checkout([$class: 'GitSCM', branches: [[name: '*/master']], userRemoteConfigs: [[url: 'https://dev...@gitlab.company.com/username/cc_terraform_aws.git',credentialsId:PASSWORD]]])
}
}
}
This always give me:
stderr: fatal: Authentication failed for 'https://gitlab.company.com/username/cc_terraform_aws.git/'
When configuring the Pipeline for the “checkout scm” I put the same url (different project) and the same credentialsId and it works but on the second scm it doesn’t work because of credentials.
BR
Jo
The error with the password is how as:
stderr: fatal: Authentication failed for 'https://****@gitlab.company.com/username/cc_terraform_aws.git/'