Using Jenkins 2.249.1 on ubuntu 18.04, Docker version 19.03.13
I have created dkr-pwd
as secret text:
withCredentials([string(credentialsId: 'dkr-pwd', variable: 'dkr-pwd')]) {
sh "docker login -u my-id -p {dkr-pwd}"
}
Also tried
withCredentials([usernamePassword(credentialsId: 'dkr-id-pwd', passwordVariable: 'dkr-p', usernameVariable: 'dkr-id')]) {
sh "docker login -u {dkr-id} -p {dkr-p}"
}
Both fail - unauthorized: incorrect username or password
. I know my id/pwd are correct- if I don't use credentials - send my pwd as plain text it works:
sh "docker login -u my-id -p dkr-pwd"
Tried recreating credentials etc- but no success.
Credentials Binding Plugin - 1.23, Credentials Plugin - 2.3.13