goharbor/harbor · error

[volcengine-cr.PrepareForPush] the name of the repository an

Error message

[volcengine-cr.PrepareForPush] the name of the repository and namespace cannot be null

What it means

Error "[volcengine-cr.PrepareForPush] the name of the repository and namespace cannot be null" thrown in goharbor/harbor.

Source

Thrown at src/pkg/reg/adapter/volcenginecr/adapter.go:148

}

func (a *adapter) PrepareForPush(resources []*model.Resource) (err error) {
	for _, resource := range resources {
		if resource == nil {
			return errors.New("the resource cannot be null")
		}
		if resource.Metadata == nil {
			return errors.New("[volcengine-cr.PrepareForPush] the metadata of resource cannot be null")
		}
		if resource.Metadata.Repository == nil {
			return errors.New("[volcengine-cr.PrepareForPush] the namespace of resource cannot be null")
		}
		if len(resource.Metadata.Repository.Name) == 0 {
			return errors.New("[volcengine-cr.PrepareForPush] the name of the namespace cannot be null")
		}
		var paths = strings.Split(resource.Metadata.Repository.Name, "/")
		if len(paths) < 2 {
			return errors.New("[volcengine-cr.PrepareForPush] the name of the repository and namespace cannot be null")
		}
		var namespace = paths[0]
		var repository = path.Join(paths[1:]...)

		log.Debugf("namespace=%s", namespace)
		err = a.createNamespace(namespace)
		if err != nil {
			log.Errorf("PrepareForPush error :%v", err)
			return
		}
		log.Debugf("namespace=%s, repository=%s", namespace, repository)
		err = a.createRepository(namespace, repository)
		if err != nil {
			log.Errorf("PrepareForPush error :%v", err)
			return
		}
	}
	return

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/pkg/reg/adapter/volcenginecr/adapter.go:148 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/5ce6a689eb92e7e5. Report an issue: GitHub.