goharbor/harbor · error

not a acr service

Error message

not a acr service

What it means

Error "not a acr service" thrown in goharbor/harbor.

Source

Thrown at src/pkg/reg/adapter/aliacr/adapter.go:83

	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 &registryServiceInfo{
			IsACREE:    true,
			RegionID:   parts[1],
			InstanceID: parts[length-1],
		}, nil
	}
	return &registryServiceInfo{
		IsACREE:  false,
		RegionID: parts[1],
	}, nil
}

func newAdapter(registry *model.Registry) (*adapter, error) {
	url, err := getRegistryURL(registry.URL)
	if err != nil {

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/pkg/reg/adapter/aliacr/adapter.go:83 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/19ed1550af8306e3. Report an issue: GitHub.