Skip to main content
Common issues you may encounter when using the Enkryptify CLI and how to resolve them.

Authentication

These errors occur when the CLI cannot verify your identity.
Error: Not authenticated.No valid credentials were found on this machine. This usually means you haven’t logged in yet or your credentials were cleared.
ek login
Error: Authentication failed.Your session has expired or your stored credentials are no longer valid. Re-authenticate to get a fresh token.
ek login
If the problem persists, force a full re-authentication:
ek login --force
Error: Authentication failed. (during a command like run or secret list)The API rejected your credentials. This typically happens when your token expires mid-session.
ek login

Where are credentials stored?

The CLI stores your authentication token in the operating system’s credential store:
  • macOS — Keychain
  • Linux — Secret Service (GNOME Keyring) or KWallet
  • Windows — Credential Manager

Headless environments

In environments without a credential store (CI runners, containers, minimal servers), set the EK_TOKEN environment variable instead. The CLI reads this variable automatically and skips the credential store. For more details on the login flow, see the login command reference.

Configuration

These errors occur when the CLI cannot find or read your project configuration.
Error: No project configured for this directory.No Enkryptify configuration was found for the current directory or any parent directory. Link your project first:
ek configure
Error: Configuration file is corrupted. or Configuration file contains invalid JSON.The configuration file could not be parsed. Delete it and re-configure:
rm ~/.enkryptify/config.json
ek configure
Error: Your project configuration is incomplete.The configuration file is missing required fields (workspace, project or environment). Re-run the setup wizard to fill them in:
ek configure
Error: Cannot access the configuration file.The CLI cannot read or write the configuration directory.
chmod 755 ~/.enkryptify

Config file location

The configuration is stored at ~/.enkryptify/config.json. Each entry maps a directory path to a workspace, project and environment:
{
  "setups": {
    "/path/to/your/project": {
      "workspace_slug": "my-workspace",
      "project_slug": "my-project",
      "environment_id": "env-id"
    }
  }
}
For more details on the configure flow, see the configure command reference.

Secrets

These errors occur when creating or updating secrets.
Error: Invalid secret name.Secret names can only contain:
  • Letters: A-Z, a-z
  • Numbers: 0-9
  • Underscore: _
  • Hyphen: -
Names must be between 2 and 48 characters long.
# Valid
ek secret create DATABASE_URL "postgres://..."
ek secret create my-api-key "sk_live_..."

# Invalid
ek secret create "my secret" "value"    # spaces not allowed
ek secret create "a" "value"            # too short
Error: Secret value cannot be empty.Provide a non-empty value. Use quotes for values that contain spaces or special characters:
ek secret create API_KEY "my-secret-value"
For more details on managing secrets, see the secret command reference.

Network

These errors occur when the CLI cannot reach the Enkryptify API.
Error: Could not connect to the Enkryptify API.The API server is unreachable. Common causes:
  1. No internet connection — verify your network is working
  2. Firewall or proxy — ensure api.enkryptify.com (port 443) is not blocked
  3. VPN — some VPNs block outbound traffic; try disconnecting temporarily
  4. Self-hosted — verify the API_BASE_URL environment variable points to the correct server
As a workaround, use the --offline flag to run with previously cached secrets:
ek run --offline -- npm start
--offline only works if you have run the command at least once while online so that secrets are cached.

Debug mode

If you need more detail about what the CLI is doing, enable debug logging by setting one of these environment variables:
EK_DEBUG=1 ek run -- npm start
# or
EK_VERBOSE=1 ek run -- npm start
This prints additional diagnostic information to stderr, which can help you or the Enkryptify support team identify the root cause of an issue.