Skip to content

Fix Backstage Catalog Import – Repository Not Imported

DodaTech Updated 2026-06-24 3 min read

In this tutorial, you'll learn about Fix Backstage Catalog Import. We cover key concepts, practical examples, and best practices to help you understand and apply this topic effectively.

You use Backstage's Register existing component or Import an existing Repository from the catalog page. The import wizard completes successfully, but the entity never appears in the catalog. No errors are shown in the UI.

Wrong ❌

# GitHub repository structure ─ no catalog-info.yaml
my-service/
β”œβ”€β”€ src/
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── ...

You click Register existing component, enter the repo URL https://github.com/my-org/my-service, and click Analyze. The wizard says:

No catalog-info.yaml found in the Repository.

You tick ...or manually register and type the entity YAML β€” the wizard accepts it but the entity still doesn't appear.

Create catalog-info.yaml in the repo root:

apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: my-service
  annotations:
    github.com/project-slug: my-org/my-service
spec:
  type: service
  lifecycle: production
  owner: team-auth

Commit and push. Then run the import again:

  1. Catalog β†’ Register existing component
  2. Enter: https://github.com/my-org/my-service
  3. Click Analyze
βœ… Found catalog-info.yaml in branch 'main'.
Entity: Component:my-service
Backend: github
  1. Click Import

Now the entity is visible:

πŸ“ my-service
  Status: imported
  Links: [GitHub | TechDocs | ...]

If the entity still doesn't appear β€” debug:

  1. Check catalog logs: kubectl logs -l app=backstage-catalog -n backstage
  2. Verify the location was registered:
SELECT * FROM locations WHERE target ILIKE '%my-service%';
  1. Manually trigger ingestion:
curl -X POST http://localhost:7007/api/catalog/refresh

Root Cause

The catalog import wizard only registers a location in the database. The actual entity processing happens asynchronously. If catalog-info.yaml is missing, malformed, or the location points to a non‑existent branch/commit, the entity never materialises.

Prevention

  • Always create catalog-info.yaml in the repo root before running the import wizard.
  • Use the Auto‑discovery integration instead of manual imports β€” it finds entities by Repository annotation.
  • After import, check the entity page in Backstage β€” if it shows a "Location pending" badge, refresh the page.
  • Run yarn backstage-cli validate on the YAML before committing.

Common Mistakes with catalog import

  1. Using return to exit a function early instead of wrapping a pure value in the monad
  2. Mixing let bindings with <- bindings in do notation, producing type errors
  3. Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors

These mistakes appear frequently in real-world BACKSTAGE code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

**Q: Can I import a Repository without a catalog-info.yaml?**

A: Yes β€” use the Manual registration option and paste the entity YAML. But Backstage won't auto‑update when the repo changes.

**Q: Why does import fail with "Repository not found"?**

A: The integration token lacks access to the repo. Check the token's repo scope in GitHub settings.

**Q: How do I bulk import dozens of repos?**

A: Use the Bulk Import API or the @backstage/plugin-catalog-import bulk endpoint. Best for migrations.

**Q: Can I import from GitLab or Bitbucket?**

A: Yes β€” configure the respective integrations in app-config.yaml and use the same import wizard.


Catalog import is covered in the DodaTech Backstage Catalog Administration course.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro