Skip to content
Latchkey

dbt "Could not find profile named" in CI

dbt read the profile: key from dbt_project.yml and looked for a matching top-level entry in profiles.yml, but none exists. The name in the project file and the name in profiles.yml must match exactly.

What this error means

dbt run or dbt debug stops with "Could not find profile named 'X'". It happens in CI when profiles.yml is absent or defines a different profile name than the project expects.

dbt
Runtime Error
  Could not find profile named 'my_project'

Common causes

The profile name does not match dbt_project.yml

The profile: in dbt_project.yml names one profile while profiles.yml defines another, so the lookup fails.

profiles.yml is not where dbt looks in CI

dbt reads ~/.dbt/profiles.yml by default; if CI put the file elsewhere without --profiles-dir, the expected profile is not found.

How to fix it

Align the profile name and location

  1. Confirm the top-level key in profiles.yml matches profile: in dbt_project.yml.
  2. Point dbt at the file with --profiles-dir if it is committed in the repo.
  3. Run dbt debug to confirm the profile resolves.
Terminal
dbt debug --profiles-dir ./ci

Match the key exactly

The name is case-sensitive and must be identical in both files.

dbt_project.yml
# dbt_project.yml
profile: 'my_project'

# profiles.yml
my_project:
  target: ci
  outputs: { ci: { ... } }

How to prevent it

  • Keep the profile: name identical in dbt_project.yml and profiles.yml.
  • Pass --profiles-dir when the profile lives in the repo, not in ~/.dbt.
  • Run dbt debug early so a name mismatch fails before models run.

Frequently asked questions

What causes ""Could not find profile named""?
The profile: in dbt_project.yml names one profile while profiles.yml defines another, so the lookup fails.
How do I fix "Could not find profile named"?
Align the profile name and location

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card