goharbor/harbor · error

failed to list artifacts of repository

Error message

failed to list artifacts of repository %s: %v

What it means

Returned inside a concurrent FetchArtifacts task when listing artifacts for a single GitHub Container Registry repository fails. It wraps the per-repository error with the repo name; the failure comes from the GitHub API (rate limiting, auth, or connectivity) and aborts that repo's task in the limited-concurrency runner.

Solutions

  1. Check GitHub API rate limits and personal access token scopes (read:packages)
  2. Verify network connectivity to ghcr.io / api.github.com
  3. Retry the operation; GitHub API rate-limit errors are transient
  4. Inspect the wrapped error to identify the failing repository and root cause
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/pkg/reg/adapter/githubcr/adapter.go:169 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/f85451a28aa01127. Report an issue: GitHub.

Appendix: source

Thrown at src/pkg/reg/adapter/githubcr/adapter.go:169

	} else {
		err = errors.New("only support specific repository name")
		return
	}

	if len(repositories) == 0 {
		return nil, nil
	}

	var rawResources = make([]*model.Resource, len(repositories))
	runner := utils.NewLimitedConcurrentRunner(adp.MaxConcurrency)

	for i, r := range repositories {
		index := i
		repo := r
		runner.AddTask(func() error {
			artifacts, err := a.listArtifacts(repo, filters)
			if err != nil {
				return fmt.Errorf("failed to list artifacts of repository %s: %v", repo, err)
			}
			if len(artifacts) == 0 {
				return nil
			}
			rawResources[index] = &model.Resource{
				Type:     model.ResourceTypeImage,
				Registry: a.registry,
				Metadata: &model.ResourceMetadata{
					Repository: &model.Repository{
						Name: repo,
					},
					Artifacts: artifacts,
				},
			}

			return nil
		})
	}

View on GitHub (pinned to 7b2fd08cc5)