From b9c733f4d49c4576c624ee30869322cdd30d7136 Mon Sep 17 00:00:00 2001 From: abdouladieng Date: Thu, 24 Sep 2026 15:42:24 +0000 Subject: [PATCH] fix(registry): remove redundant ServerAddressFromHostname in Login (#32681) In (*Client).Login(), credentials.ServerAddressFromHostname(key) was originally added in commit 6ab7aa361 as a workaround for oras-go v2.6.0 where ServerAddressFromRegistry("registry-1.docker.io") did not return the canonical https://index.docker.io/v1/. Since oras-go was bumped to v2.6.2 (which incorporates oras-project/oras-go#966), ServerAddressFromRegistry already normalizes both "docker.io" and "registry-1.docker.io" properly, making this second call redundant. Closes #32681 Signed-off-by: abdouladieng --- pkg/registry/client.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/registry/client.go b/pkg/registry/client.go index 786342c07..7fa1bb1f7 100644 --- a/pkg/registry/client.go +++ b/pkg/registry/client.go @@ -266,7 +266,6 @@ func (c *Client) Login(host string, options ...LoginOption) error { c.authorizer.ForceAttemptOAuth2 = false key := credentials.ServerAddressFromRegistry(host) - key = credentials.ServerAddressFromHostname(key) if err := c.credentialsStore.Put(ctx, key, cred); err != nil { return err }