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.
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
- Confirm the top-level key in profiles.yml matches
profile:in dbt_project.yml. - Point dbt at the file with
--profiles-dirif it is committed in the repo. - Run
dbt debugto confirm the profile resolves.
dbt debug --profiles-dir ./ciMatch the key exactly
The name is case-sensitive and must be identical in both files.
# 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-dirwhen the profile lives in the repo, not in ~/.dbt. - Run
dbt debugearly so a name mismatch fails before models run.