refactor(registry): drop host-path login warning superseded by namespaced login

warnIfHostHasPath warned that registry login only supports a hostname and
not a repository path. Namespaced login now supports exactly that, so the
warning is no longer accurate and the helper has no call site.

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
pull/32065/head
Terry Howe 1 month ago
parent 1777fc22a4
commit 0674d9f4e4
No known key found for this signature in database

@ -428,17 +428,6 @@ type (
} }
) )
// warnIfHostHasPath checks if the host contains a repository path and logs a warning if it does.
// Returns true if the host contains a path component (i.e., contains a '/').
func warnIfHostHasPath(host string) bool {
if strings.Contains(host, "/") {
registryHost, _, _ := strings.Cut(host, "/")
slog.Warn("registry login currently only supports registry hostname, not a repository path", "host", host, "suggested", registryHost)
return true
}
return false
}
// noopStore is a credentials.Store that performs no persistence. It is used // noopStore is a credentials.Store that performs no persistence. It is used
// during namespaced login to verify credentials with a registry ping without // during namespaced login to verify credentials with a registry ping without
// causing remote.Login to store credentials under the hostname-only key. // causing remote.Login to store credentials under the hostname-only key.

Loading…
Cancel
Save