From 60f7a80a2a0c585e11769d161daea8176e95388f Mon Sep 17 00:00:00 2001 From: Grant Linville Date: Fri, 12 Apr 2024 13:56:41 -0400 Subject: [PATCH] fix: credentials: set server address on auth if it isn't set Signed-off-by: Grant Linville --- pkg/credentials/store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/credentials/store.go b/pkg/credentials/store.go index 86b6fe50..df9c8708 100644 --- a/pkg/credentials/store.go +++ b/pkg/credentials/store.go @@ -35,6 +35,10 @@ func (s *Store) Get(toolName string) (*Credential, bool, error) { return nil, false, nil } + if auth.ServerAddress == "" { + auth.ServerAddress = toolNameWithCtx(toolName, s.credCtx) // Not sure why we have to do this, but we do. + } + cred, err := credentialFromDockerAuthConfig(auth) if err != nil { return nil, false, err