diff --git a/registry/proxy/proxyregistry.go b/registry/proxy/proxyregistry.go index d353af3ff..7ec638b7f 100644 --- a/registry/proxy/proxyregistry.go +++ b/registry/proxy/proxyregistry.go @@ -260,7 +260,9 @@ func (r *remoteAuthChallenger) tryEstablishChallenges(ctx context.Context) error defer r.Unlock() remoteURL := r.remoteURL - remoteURL.Path = "/v2/" + if remoteURL.Path == "" || remoteURL.Path == "/" { + remoteURL.Path = "/v2/" + } challenges, err := r.cm.GetChallenges(remoteURL) if err != nil { return err