diff --git a/cli/operations/server/config.go b/cli/operations/server/config.go index 677e9178b..f1408aa70 100644 --- a/cli/operations/server/config.go +++ b/cli/operations/server/config.go @@ -195,7 +195,7 @@ func backfillURLs(config *types.Config) error { config.URL.UI = baseURL.String() } if config.URL.Registry == "" { - config.URL.Registry = baseURL.String() + config.URL.Registry = combineToRawURL(scheme, "host.docker.internal", port, "") } return nil diff --git a/registry/app/api/controller/metadata/base.go b/registry/app/api/controller/metadata/base.go index 6a59a371b..62822c2ed 100644 --- a/registry/app/api/controller/metadata/base.go +++ b/registry/app/api/controller/metadata/base.go @@ -18,6 +18,7 @@ import ( "context" "encoding/json" "fmt" + "strings" "github.com/harness/gitness/app/paths" api "github.com/harness/gitness/registry/app/api/openapi/contracts/artifact" @@ -184,7 +185,7 @@ func getManifestConfig( driver storagedriver.StorageDriver, ) (*manifestConfig, error) { var config manifestConfig - path, err := storage.PathFn(rootRef, digest) + path, err := storage.PathFn(strings.ToLower(rootRef), digest) if err != nil { return nil, fmt.Errorf("failed to get path: %w", err) } diff --git a/registry/app/remote/adapter/dockerhub/adapter.go b/registry/app/remote/adapter/dockerhub/adapter.go index 8acccbab0..35cc492fa 100644 --- a/registry/app/remote/adapter/dockerhub/adapter.go +++ b/registry/app/remote/adapter/dockerhub/adapter.go @@ -34,7 +34,6 @@ func init() { log.Error().Stack().Err(err).Msgf("Register adapter factory for %s", adapterType) return } - log.Info().Msgf("Factory for adapter %s registered", adapterType) } func newAdapter( diff --git a/types/config.go b/types/config.go index 419b90cb4..d14d8aed9 100644 --- a/types/config.go +++ b/types/config.go @@ -91,7 +91,7 @@ type Config struct { Container string `envconfig:"GITNESS_URL_CONTAINER"` // Registry is used as a base to generate external facing URLs. - // Value is derived from Base unless explicitly specified (e.g. http://localhost:3000). + // Value is derived from HTTP.Server unless explicitly specified (e.g. http://host.docker.internal:3000). Registry string `envconfig:"GITNESS_REGISTRY_URL"` }