remove docker registry string match

This commit is contained in:
Aishwarya Lad
2024-07-09 23:05:03 -07:00
parent 6cade1e98b
commit bee421255a
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"encoding/json"
"errors"
"fmt"
"strings"
)
const (
@@ -50,7 +49,7 @@ func (c *Config) SetCredHelper(registry, helper string) {
func (c *Config) CreateDockerConfigJson(credentials []RegistryCredentials) ([]byte, error) {
for _, cred := range credentials {
if cred.Registry != "" && strings.Contains(cred.Registry, "docker") {
if cred.Registry != "" {
if cred.Username == "" {
return nil, fmt.Errorf("Username must be specified for registry: %s", cred.Registry)