goharbor/harbor · error · NotFoundError

repo , tag not found

Error message

repo %v, tag %v not found

What it means

Fired in proxy UseLocalManifest when the remote registry's ManifestExist HEAD request reports the repo:tag does not exist remotely and no local artifact can serve the request. It signals a genuine miss: neither the upstream registry nor the local Harbor cache holds the manifest.

Solutions

  1. Verify the repo and tag names are correct and were pushed to the upstream registry
  2. Check upstream registry connectivity and credentials; a 404 may mask auth problems
  3. Enable proxy cache (ProxyCacheLocalOnNotFound) so pulls are served from local cache on remote miss
  4. Re-push the artifact if it was deleted upstream
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/controller/proxy/controller.go:196 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/d6c879b28e7c16ee. Report an issue: GitHub.

Appendix: source

Thrown at src/controller/proxy/controller.go:196

	if a != nil && len(art.Digest) > 0 {
		return true, nil, nil
	}

	remoteRepo := GetRemoteRepo(art)
	exist, desc, err := remote.ManifestExist(remoteRepo, getReference(art)) // HEAD
	if err != nil {
		if errors.IsRateLimitError(err) && a != nil { // if rate limit, use local if it exists, otherwise return error
			return true, nil, nil
		}
		return false, nil, err
	}
	if !exist || desc == nil {
		// if not found in remote and local artifact exists, check if we should serve from local cache
		if a != nil && p != nil && p.ProxyCacheLocalOnNotFound() {
			log.Infof("Artifact not found in remote registry but exists in local cache, serving from local: %v:%v", art.Repository, art.Tag)
			return true, nil, nil
		}
		return false, nil, errors.NotFoundError(fmt.Errorf("repo %v, tag %v not found", art.Repository, art.Tag))
	}

	var content []byte
	var contentType string
	if c.cache == nil {
		return a != nil && string(desc.Digest) == a.Digest, nil, nil // digest matches
	}
	// Pass digest to the cache key, digest is more stable than tag, because tag could be updated
	if len(art.Digest) == 0 {
		art.Digest = string(desc.Digest)
	}
	err = c.cache.Fetch(ctx, manifestListKey(art.Repository, art), &content)
	if err != nil {
		if errors.Is(err, cache.ErrNotFound) {
			log.Debugf("Digest is not found in manifest list cache, key=cache:%v", manifestListKey(art.Repository, art))
		} else {
			log.Errorf("Failed to get manifest list from cache, error: %v", err)
		}

View on GitHub (pinned to 7b2fd08cc5)