问题
I am tring to build and publish my job with the help of CloudBees Docker Build and Publish plugin. I added my credentials to Jenkins. When I build the job, it stucks at pushing into Docker by saying authentication error. I checked from cmd that I can login to docker and I could created the image but cannot do it with Jenkins. Do you have any idea about how to solve this problem? Error log is in the following:
[jenkins-docker] $ docker tag c89e01bffe59 reponame/imagename:latest
[jenkins-docker] $ docker inspect c89e01bffe59
[jenkins-docker] $ docker push reponame/imagename:dockerhub
The push refers to repository [docker.io/reponame/imagename]
a0dfd9abd11c: Preparing
7d0784c2c563: Preparing
715d0a3d2cc2: Preparing
155d997ed77c: Preparing
88cfc2fcd059: Preparing
760e8d95cf58: Preparing
7cc1c2d7e744: Preparing
8c02234b8605: Preparing
760e8d95cf58: Waiting
7cc1c2d7e744: Waiting
8c02234b8605: Waiting
88cfc2fcd059: Layer already exists
7d0784c2c563: Layer already exists
715d0a3d2cc2: Layer already exists
a0dfd9abd11c: Layer already exists
7cc1c2d7e744: Layer already exists
760e8d95cf58: Layer already exists
8c02234b8605: Layer already exists
155d997ed77c: Layer already exists
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the docker.io registry NOW to avoid future disruption. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Build step 'Docker Build and Publish' marked build as failure
Finished: FAILURE
来源:https://stackoverflow.com/questions/62205973/jenkins-credential-is-not-working-dockerhub