Explorar el Código

patch fix for gar repo parsing (#4366)

ianedwards hace 2 años
padre
commit
7ac0983bef
Se han modificado 1 ficheros con 0 adiciones y 5 borrados
  1. 0 5
      cli/cmd/docker/auth.go

+ 0 - 5
cli/cmd/docker/auth.go

@@ -109,10 +109,6 @@ func (a *AuthGetter) GetGARCredentials(ctx context.Context, serverURL string, pr
 
 	cachedEntry := a.Cache.Get(serverURL)
 
-	if !strings.HasPrefix(serverURL, "https://") {
-		serverURL = "https://" + serverURL
-	}
-
 	parsedURL, err := url.Parse(serverURL)
 	if err != nil {
 		return "", "", err
@@ -396,7 +392,6 @@ func (f *FileCredentialCache) save(registryCache *RegistryCache) error {
 	}
 
 	_, err = file.Write(buff)
-
 	if err != nil {
 		file.Close()
 		os.Remove(file.Name())