Skip to content
DeployAI
BlockerCode env_file_committed

.env file is committed to git

What it means

An env file with passwords and keys is saved in git, the version history of the code.

Why it stops the deploy

Anyone who sees the code also sees the secrets. That is why we stop the upload.

How to fix it

  1. Remove the file from git and add it to the list of files git ignores.
  2. Replace every key that was in the file, because it is already exposed.
  3. Keep secrets in the site settings on DeployAI, not in the code.

Prompt for your agent

Copy it and paste it into your agent. It fixes the project, explains each step, and runs the check again.

DeployAI check found this in the project: .env file is committed to git.
Remove the env file from git (git rm --cached), add .env* to .gitignore, and tell the user to rotate any secret that was in it. Secrets go on the site page in DeployAI, under Settings, Secret keys.
Explain your plan and wait for my approval before architectural changes. Do not remove features without asking.
Explain every step to me in simple words.
When done, run: npx deployai@latest check