Skip to content

Commit 733f94c

Browse files
committed
fix: legacy docker support broken for login
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
1 parent 9d56978 commit 733f94c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎pkg/registry/client.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ func (c *Client) Login(host string, options ...LoginOption) error {
301301
return fmt.Errorf("authenticating to %q: %w", host, err)
302302
}
303303

304-
key := credentials.ServerAddressFromRegistry(host)
305-
306304
// The credentialsStore loader does not handle empty files. So, there is a workaround.
307305
// This can be removed when the credentials loader can handle empty files.
308306
// When Helm catches an empty file error it causes the loader to trigger its fault
@@ -327,6 +325,8 @@ func (c *Client) Login(host string, options ...LoginOption) error {
327325
c.credentialsFileTemp = false
328326
}
329327

328+
key := credentials.ServerAddressFromRegistry(host)
329+
key = credentials.ServerAddressFromHostname(key)
330330
if err := c.credentialsStore.Put(ctx, key, cred); err != nil {
331331
return err
332332
}

0 commit comments

Comments
 (0)