wave icon indicating copy to clipboard operation
wave copied to clipboard

Getting Missing credentials for target cache repository even after adding credentials in platform

Open munishchouhan opened this issue 1 year ago • 5 comments
trafficstars

Getting this error in master: Note: not getting this error in branch 563-invalid-error-when-pulling-a-failing-build

18:27:27.539 [io-executor-thread-2] DEBUG i.s.w.s.i.ContainerInspectServiceImpl - Build credentials for repository: alpine => RegistryCredentials[username=username; password=dck****]
18:27:27.553 [io-executor-thread-3] WARN  io.seqera.wave.ErrorHandler - Missing credentials for target cache repository: docker.io/hrma017/dev - Request: POST /v1alpha2/container
io.seqera.wave.exception.BadRequestException: Missing credentials for target cache repository: docker.io/hrma017/dev
	at io.seqera.wave.service.inspect.ContainerInspectServiceImpl.credentialsConfigJson(ContainerInspectServiceImpl.groovy:99)
	at io.seqera.wave.controller.ContainerController.makeBuildRequest(ContainerController.groovy:316)
	at io.seqera.wave.controller.ContainerController.makeRequestData(ContainerController.groovy:398)
	at io.seqera.wave.controller.ContainerController.handleRequest(ContainerController.groovy:234)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1036)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1019)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:97)
	at io.seqera.wave.controller.ContainerController$_getContainerImpl_lambda1.doCall(ContainerController.groovy:199)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
	at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:653)
	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
	at io.micrometer.core.instrument.composite.CompositeTimer.record(CompositeTimer.java:141)
	at io.micrometer.core.instrument.Timer.lambda$wrap$0(Timer.java:196)

munishchouhan avatar Jul 25 '24 16:07 munishchouhan

Its prints repo name as 'alpine', which is the base image in Dockerfile i am using as reproducer

munishchouhan avatar Jul 25 '24 16:07 munishchouhan

after debugging i found that wave is throwing this error for cache repository

munishchouhan avatar Jul 25 '24 16:07 munishchouhan

ok found the issue, after adding these changes https://github.com/seqeralabs/wave/pull/564 we need to specify repo for docker with docker.io/repo, we cannot specify just repo for docker hub anymore.

cc @pditommaso

munishchouhan avatar Jul 25 '24 16:07 munishchouhan

Not understanding, how to replicate the problem?

pditommaso avatar Jul 25 '24 19:07 pditommaso

If i just add hrma017/dev in build repository and not add docker.io

munishchouhan avatar Jul 25 '24 19:07 munishchouhan