dbt "Could not find profiles.yml" file not found in CI
dbt could not locate profiles.yml. By default it reads ~/.dbt/profiles.yml; on a fresh CI runner that directory does not exist, so you must place the file or point dbt at it with --profiles-dir.
What this error means
dbt run or dbt debug fails at startup with "Runtime Error: Could not find profiles.yml" or "The profiles.yml file does not exist".
dbt
Runtime Error
Could not find profiles.yml. Please make sure a profiles.yml file exists in
/home/runner/.dbtCommon causes
No profiles.yml on a clean runner
Hosted runners start without a ~/.dbt directory, so unless CI creates or points to profiles.yml, dbt finds nothing.
The file lives in the repo but dbt is not told where
A committed profiles.yml is ignored unless you pass --profiles-dir or set DBT_PROFILES_DIR.
How to fix it
Point dbt at a committed profiles.yml
- Commit a CI profiles.yml (with env_var references, no secrets) in the repo.
- Set
DBT_PROFILES_DIRor pass--profiles-dirto that folder. - Run
dbt debugto confirm dbt reads it.
.github/workflows/ci.yml
env:
DBT_PROFILES_DIR: ${{ github.workspace }}/ciWrite profiles.yml into ~/.dbt during the job
Generate the file from secrets before invoking dbt if you prefer the default location.
Terminal
mkdir -p ~/.dbt
cp ci/profiles.yml ~/.dbt/profiles.ymlHow to prevent it
- Commit a CI profiles.yml that uses env_var and set DBT_PROFILES_DIR.
- Run
dbt debugearly so a missing file fails before models run. - Never commit real credentials; render them from CI secrets.
Related guides
dbt "Could not find profile named" in CIFix dbt "Could not find profile named X" in CI - the profile key in dbt_project.yml does not match any profil…
dbt "Credentials in profile target invalid" in CIFix dbt "Credentials in profile ..., target ... invalid" in CI - profiles.yml is missing a required connectio…
dbt "Env var required but not provided" in CIFix dbt "Env var required but not provided: DBT_..." in CI - a profiles.yml env_var call references a variabl…