-
Notifications
You must be signed in to change notification settings - Fork 202
JIB: Unauthorized registry exception for "from" registry #1763
Comments
@yadavnikhil : I haven't tested it with credentials in setings.xml. Does it work for you when credentials are in docker config? |
Could you please elaborate which CredentialsRetreiver you're referring to? I couldn't find any object like this in Docker maven plugin source code.
|
Hmm, I think you're right. It's not that registry authentication is not working. I just tried and push seemed to be working when credentials are in settings.xml. But It couldn't work when @erikgb : Were you able to find some solution for authentication for pulling images in jib? I remember you filed an issue on Jib repo querying this issue. |
Shall we try to upgrade |
@rohanKanojia : JIB API (java) supports it: https://www.javadoc.io/static/com.google.cloud.tools/jib-core/0.12.0/com/google/cloud/tools/jib/api/RegistryImage.html The main issue here seems to be to get the credential details in f-m-p. But you probably know how to do it.... 😄 |
Relates to #1738 |
@erikgb You're right. We don't seem to be adding fabric8-maven-plugin/core/src/main/java/io/fabric8/maven/core/util/JibBuildServiceUtil.java Lines 281 to 314 in 49b0f19
|
@rohanKanojia Thanks a lot for commenting, yes push works fine with authentication, its the issue with ‘from’ image authentication. I tried just using jib to test and the standalone use worked fine for me. So, fix needed to authenticate base image registry whenever needed in fabric8 maven. |
@yadavnikhil : No problem. I'm preparing a PR to fix this issue. |
Closing since #1766 has been merged. |
Description
I'm getting registry unauthorized exception when using Jib when "from" image registry is from a authenticated registry.
Failed to execute the build: java.lang.UnsupportedOperationException: java.lang.IllegalStateException: com.google.cloud.tools.jib.api.RegistryUnauthorizedException
The relevant credentials are set in maven settings.xml. On debugging it looks like for baseImageConfiguration object, no credentials are getting set for CredentialsRetreiver.
Info
mvn -v
) :The text was updated successfully, but these errors were encountered: