You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the issue:
When trying to login to my self-hosted Docker registry, Jib fails with the following error:
Caused by: com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate with registry <my registry> because: 'Bearer' was not found in the 'WWW-Authenticate' header, tried to parse: Basic
Having a look to com.google.cloud.tools.jib.registry.RegistryAuthenticator#fromAuthenticationMethod I see that regexp used to determine authentification method has a space before the .*.
authenticationMethod.matches("^(?i)(basic) .*")
This makes jib to fail to select auth method given header WWW-Authenticate: Basic
Environment:
Description of the issue:
When trying to login to my self-hosted Docker registry, Jib fails with the following error:
Having a look to
com.google.cloud.tools.jib.registry.RegistryAuthenticator#fromAuthenticationMethod
I see that regexp used to determine authentification method has a space before the.*
.This makes jib to fail to select auth method given header
WWW-Authenticate: Basic
Expected behavior:
According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate#syntax it is allowed to use
WWW-Authenticate: Basic
without providing any realm/charset. Jib should allow thatSteps to reproduce:
Try to login to any registry responding with
WWW-Authenticate: Basic
header.The text was updated successfully, but these errors were encountered: