Skip to content
Latchkey

act ".secrets" file not loaded / secret empty running Actions locally

act does not read your GitHub repository secrets. It loads secrets from a local .secrets file (or -s KEY=value / --secret-file). If the file is missing or the key name differs, the secret is empty at runtime.

What this error means

A step reads secrets.MY_KEY as empty and fails with a null/blank credential, even though the secret is set on GitHub.

act
Error: Input required and not supplied: password
| secrets.DOCKER_PASSWORD resolved to an empty string

Common causes

No .secrets file or --secret-file provided

act only knows secrets you give it locally; GitHub repository secrets are not available to act.

The key name does not match the workflow

A typo or case mismatch between the .secrets key and secrets.NAME leaves the value unresolved.

How to fix it

Create a .secrets file with matching keys

Use exactly the names the workflow references, one KEY=value per line, and gitignore the file.

.secrets
DOCKER_USERNAME=dev
DOCKER_PASSWORD=your_password_here

Point act at an explicit secret file

Load a non-default file with --secret-file, or pass individual secrets with -s.

Terminal
act --secret-file .secrets.ci -j deploy

How to prevent it

  • Keep a gitignored .secrets file whose keys mirror the workflow.
  • Match secret names exactly, including case.
  • Never commit real secrets; use placeholders in shared examples.

Frequently asked questions

What causes ""secret ... is empty" under act"?
act only knows secrets you give it locally; GitHub repository secrets are not available to act.
How do I fix "secret ... is empty" under act?
Use exactly the names the workflow references, one KEY=value per line, and gitignore the file.

Related guides

References

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