jenkinsci / jenkinsci/docker-workflow-plugin
[JENKINS-52761] withDockerRegistry fails to login with complex password
- Dominant language
- Java
- Stars
- 527
- Forks
- 422
- Avg merge
- 10m
- Merged PRs (30d)
- 1
Description
Jenkinsfile:
```
stage('Deliver') {
steps {
withDockerRegistry([credentialsId: 'docker-creds', url: '']) {
sh "docker push imagename"
}
}
}
```
Error:
```
$ docker login -u username -p ******** https://index.docker.io/v1/
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
```
Workaround:
Change Docker Hub password from something complex (e.g. "]GT~XMRZwWc6]dUg:NMs") to something very simple (e.g. "insecurepass"). Using a simple password that is very long (e.g. "verylongpasswordhere") works fine too.
`docker login` using complex password from the CLI works just fine.
---
Originally reported by gtirloni, imported from: withDockerRegistry fails to login with complex password
Raw content of original issue
Jenkinsfile:
stage('Deliver') {
steps {
withDockerRegistry([credentialsId: 'docker-creds', url: '']) {
sh "docker push imagename"
}
}
}Error:
$ docker login -u username -p ******** https://index.docker.io/v1/
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or passwordWorkaround:
Change Docker Hub password from something complex (e.g. "]GT~XMRZwWc6]dUg:NMs") to something very simple (e.g. "insecurepass"). Using a simple password that is very long (e.g. "verylongpasswordhere") works fine too.
`docker login` using complex password from the CLI works just fine.
environment
```
Jenkins 2.134
Docker Pipeline 1.17
```
Contributor guide
Assessment
This issue has not been assessed yet.