goharbor/harbor · error
invalid service format: expected 'registry.aliyuncs.com:regi
Error message
invalid service format: expected 'registry.aliyuncs.com:region:xxxxx'
What it means
Error "invalid service format: expected 'registry.aliyuncs.com:region:xxxxx'" thrown in goharbor/harbor.
Source
Thrown at src/pkg/reg/adapter/aliacr/adapter.go:79
func getRegistryURL(url string) (string, error) {
if url == "" {
return "", errors.New("empty url")
}
rs := regACRServiceURL.FindStringSubmatch(url)
if rs == nil {
return url, nil
}
return fmt.Sprintf(registryEndpointTpl, rs[1]), nil
}
// example:
// registry.aliyuncs.com:cn-hangzhou:china:cri-xxxxxxxxx
// registry.aliyuncs.com:cn-hangzhou:26842
func parseRegistryService(service string) (*registryServiceInfo, error) {
parts := strings.Split(service, ":")
length := len(parts)
if length < 2 {
return nil, errors.New("invalid service format: expected 'registry.aliyuncs.com:region:xxxxx'")
}
if !strings.EqualFold(parts[0], registryACRService) {
return nil, errors.New("not a acr service")
}
if strings.HasPrefix(parts[length-1], "cri-") {
return ®istryServiceInfo{
IsACREE: true,
RegionID: parts[1],
InstanceID: parts[length-1],
}, nil
}
return ®istryServiceInfo{
IsACREE: false,
RegionID: parts[1],
}, nil
}View on GitHub (pinned to 7b2fd08cc5)
When it happens
Trigger: Thrown at src/pkg/reg/adapter/aliacr/adapter.go:79 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/625dbcd667752429.
Report an issue: GitHub.