Fix OpenShift credential loader (#876)

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2022-03-02 02:59:42 +01:00 committed by GitHub
parent efb7996da7
commit 8dd90bff19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -119,7 +119,10 @@ func GetDockerCredentialLoaders() []creds.CredentialsCallback {
return nil
}
cc := rawConf.Contexts[rawConf.CurrentContext]
cc, ok := rawConf.Contexts[rawConf.CurrentContext]
if !ok {
return nil
}
authInfo := rawConf.AuthInfos[cc.AuthInfo]
var user string