goharbor/harbor · error
tcr only support repo in format
Error message
tcr only support repo in format <namespace>/<name>, but got: %s
What it means
Returned by DeleteManifest when the repository string is not exactly '<namespace>/<name>' — i.e. splitting on '/' does not yield exactly two parts. Tencent TCR requires this two-segment layout to derive the namespace and repo name for deletion. The input at fault is the repository argument passed by the caller.
Solutions
- Pass the repository in the exact <namespace>/<name> form required by TCR
- Reject or normalize repository names containing extra or missing path segments upstream
- Validate the repository format before invoking DeleteManifest
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/pkg/reg/adapter/tencentcr/artifact_registry.go:182 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/8d6af4d61528a8fd.
Report an issue: GitHub.
Appendix: source
Thrown at src/pkg/reg/adapter/tencentcr/artifact_registry.go:182
}
namespaces = append(namespaces, nms...)
}
}
}
if len(namespaces) > 0 {
log.Debugf("[tencent-tcr.listCandidateNamespaces] pattern=%s, namespaces=%v", namespacePattern, namespaces)
return namespaces, nil
}
// list all
return a.listNamespaces()
}
func (a *adapter) DeleteManifest(repository, reference string) (err error) {
parts := strings.Split(repository, "/")
if len(parts) != 2 {
return fmt.Errorf("tcr only support repo in format <namespace>/<name>, but got: %s", repository)
}
log.Warningf("[tencent-tcr.DeleteManifest] namespace=%s, repository=%s, tag=%s", parts[0], parts[1], reference)
return a.deleteImage(parts[0], parts[1], reference)
}
View on GitHub (pinned to 7b2fd08cc5)