goharbor/harbor · error
invalid scheme: %s
Error message
invalid scheme: %s
What it means
Error "invalid scheme: %s" thrown in goharbor/harbor.
Source
Thrown at src/common/utils/utils.go:48
cronlib "github.com/robfig/cron/v3"
"github.com/goharbor/harbor/src/common"
"github.com/goharbor/harbor/src/lib/log"
)
// ParseEndpoint parses endpoint to a URL
func ParseEndpoint(endpoint string) (*url.URL, error) {
endpoint = strings.Trim(endpoint, " ")
endpoint = strings.TrimRight(endpoint, "/")
if len(endpoint) == 0 {
return nil, fmt.Errorf("empty URL")
}
i := strings.Index(endpoint, "://")
if i >= 0 {
scheme := endpoint[:i]
if scheme != "http" && scheme != "https" {
return nil, fmt.Errorf("invalid scheme: %s", scheme)
}
} else {
endpoint = "http://" + endpoint
}
return url.ParseRequestURI(endpoint)
}
// ParseRepository splits a repository into two parts: project and rest
func ParseRepository(repository string) (project, rest string) {
repository = strings.TrimLeft(repository, "/")
repository = strings.TrimRight(repository, "/")
if !strings.ContainsRune(repository, '/') {
rest = repository
return
}
project, rest, _ = strings.Cut(repository, "/")
returnView on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/common/utils/utils.go:48 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/2026a763243e1a86.
Report an issue: GitHub.