goharbor/harbor · error

failed to fetch artifacts: %v

Error message

failed to fetch artifacts: %v

What it means

Error "failed to fetch artifacts: %v" thrown in goharbor/harbor.

Source

Thrown at src/controller/replication/flow/stage.go:66

	}
	dstAdapter, err = dstFactory.Create(policy.DestRegistry)
	if err != nil {
		return nil, nil, fmt.Errorf("failed to create adapter for destination registry %s: %v", policy.DestRegistry.URL, err)
	}
	log.Debug("replication flow initialization completed")
	return srcAdapter, dstAdapter, nil
}

// fetch resources from the source registry
func fetchResources(adapter adp.Adapter, policy *repctlmodel.Policy) ([]*model.Resource, error) {
	var resources []*model.Resource
	reg, ok := adapter.(adp.ArtifactRegistry)
	if !ok {
		return nil, fmt.Errorf("the adapter doesn't implement the ArtifactRegistry interface")
	}
	res, err := reg.FetchArtifacts(policy.Filters)
	if err != nil {
		return nil, fmt.Errorf("failed to fetch artifacts: %v", err)
	}
	resources = append(resources, res...)

	log.Debug("fetch resources from the source registry completed")
	return resources, nil
}

// assemble the source resources by filling the registry information
func assembleSourceResources(resources []*model.Resource,
	policy *repctlmodel.Policy) []*model.Resource {
	for _, resource := range resources {
		resource.Registry = policy.SrcRegistry
	}
	log.Debug("assemble the source resources completed")
	return resources
}

// assemble the destination resources by filling the metadata, registry and override properties

View on GitHub (pinned to 7b2fd08cc5)

When it happens

Trigger: Thrown at src/controller/replication/flow/stage.go:66 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/ea75543b5a9c8f19. Report an issue: GitHub.