goharbor/harbor · error
unsupported auth scheme: %v
Error message
unsupported auth scheme: %v
What it means
Error "unsupported auth scheme: %v" thrown in goharbor/harbor.
Source
Thrown at src/pkg/registry/auth/authorizer.go:137
if len(challenges) == 0 {
a.authorizer = null.NewAuthorizer()
return nil
}
cm := map[string]challenge.Challenge{}
for _, challenge := range challenges {
cm[challenge.Scheme] = challenge
}
if challenge, exist := cm["bearer"]; exist {
a.authorizer = bearer.NewAuthorizer(challenge.Parameters["realm"],
challenge.Parameters["service"], basic.NewAuthorizer(a.username, a.password),
a.client.Transport)
return nil
}
if _, exist := cm["basic"]; exist {
a.authorizer = basic.NewAuthorizer(a.username, a.password)
return nil
}
return fmt.Errorf("unsupported auth scheme: %v", challenges)
}
// Check whether the request targets to the registry.
// If doesn't, the request shouldn't be handled by the authorizer.
// e.g. the requests sent to backend storage(s3, etc.)
func (a *authorizer) isTarget(req *http.Request) bool {
index := strings.Index(req.URL.Path, "/v2/")
if index == -1 {
return false
}
if req.URL.Host != a.url.Host || req.URL.Scheme != a.url.Scheme ||
req.URL.Path[:index+4] != a.url.Path {
return false
}
return true
}
View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/pkg/registry/auth/authorizer.go:137 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/1997b5c66a3c19aa.
Report an issue: GitHub.