Closed wenerme closed 8 months ago
@wenerme thanks for the question, you may find this section in the FAQ to be helpful when troubleshooting the Unauthorized
error message that you're currently seeing.
jib works good with docker.io, but when using registry from https://coding.net/, the push will fail, seem like compatibility issus,
when password not right the error is
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.3.1:build (default-cli) on project demo-app: Build image failed, perhaps you should make sure your credentials for 'zhensi-docker.pkg.coding.net/core/core/demo-app' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help: Unauthorized for zhensi-docker.pkg.coding.net/core/core/demo-app: 401 Unauthorized
[ERROR] GET https://auth.pkg.coding.net/artifacts-auth/docker/jwt?host=zhensi-docker.pkg.coding.net?service%3Ddocker&scope=repository:core/core/demo-app:pull,push
[ERROR] {"errors":[{"code":"UNAUTHORIZED","message":"Invalid credential. 请确认输入了正确的用户名和密码。\n"}]}
When password is right the error is
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.3.1:build (default-cli) on project demo-app: Build image failed, perhaps you should make sure your credentials for 'zhensi-docker.pkg.coding.net/core/core/demo-app' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help: Unauthorized for zhensi-docker.pkg.coding.net/core/core/demo-app: 401 Unauthorized
[ERROR] POST https://zhensi-docker.pkg.coding.net/v2/core/core/demo-app/blobs/uploads/
[ERROR] {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"core/core/demo-app","Action":"pull"},{"Type":"repository","Class":"","Name":"core/core/demo-app","Action":"push"}]}]}
@mpeddada1 I can pm you the username & password.
@wenerme do you solve it ?
@LQfly Maybe the problem is related to coding.net, I changed to gitea, works as expected.
Closing based on OP feedback.
Environment:
Description of the issue:
jib:build failed with 401, but jib:dockerBuild works.
Expected behavior:
jib:build works
Steps to reproduce:
jib-maven-plugin
Configuration:Log output:
Additional Information:
crane & docker works
~/.docker/config.json only contain
also tried jib.to.password & username, still 401
But multi arch image can only build by
jib:build
.