diff --git a/builder/sources/registry/registry.go b/builder/sources/registry/registry.go index 3794840b5..13668432d 100644 --- a/builder/sources/registry/registry.go +++ b/builder/sources/registry/registry.go @@ -108,7 +108,7 @@ func WrapTransport(transport http.RoundTripper, url, username, password string) func newFromTransport(registryURL, username, password string, transport http.RoundTripper, logf LogfCallback) (*Registry, error) { url := strings.TrimSuffix(registryURL, "/") containsScheme := strings.HasPrefix(url, "https") - if !strings.HasPrefix(url, "https") && strings.HasPrefix(url, "http") { + if !strings.HasPrefix(url, "https") && !strings.HasPrefix(url, "http") { url = fmt.Sprintf("http://%s", registryURL) }