Troubleshooting
Common errors
unknown profile alias: @foo
- The profile
foois not defined inprofiles.toml, or the keyfoodoesn’t exist in the profile. - Check:
cat ~/.config/hasp/profiles.toml - For bare
@foo, the profile must contain a self-key:[profiles.foo] foo = "env://FOO"
unsupported scheme: xyz
- The scheme
xyzhas no registered backend. - Check the scheme spelling. Valid schemes:
env,file,keyring,op,vault,bw,aws-sm,aws-ssm,gcp-sm,azure-kv. - If the scheme is correct, the backend may not be compiled in.
Rebuild with the appropriate feature flag:
cargo build --release --bin hasp --features aws-sm
not found: ...
- The secret does not exist at the given URL.
- Verify the URL path/region/secret name.
- For cloud backends, verify the credentials have access.
authentication failed: ...
- Missing or expired ambient credentials.
- Check the per-backend requirements:
vault://—VAULT_ADDRandVAULT_TOKEN(or~/.vault-token)op://—opCLI signed inbw://—BW_SESSIONsetaws-sm:///aws-ssm://—AWS_ACCESS_KEY_IDor IAM rolegcp-sm://—gcloud author ADCazure-kv://— Azure CLI login or managed identity
permission denied: ...
- Credentials are valid, but not authorized for this resource.
- Check IAM / RBAC / key vault access policies / GCP IAM bindings.
env does not support put
env://is read-only. Set the variable through your shell before invoking hasp.
hasp init says the file already exists
hasp initrefuses to overwrite an existingprofiles.tomlto prevent accidental data loss.- Use
hasp init --forceto overwrite, or delete the file first.
does not support list
env://andfile://do not supportlist. Uselistwithvault://,aws-sm://, or other backends that expose collections.
Completions not appearing
Static completions
- Ensure the script was written to the correct directory:
- Bash:
~/.local/share/bash-completion/completions/haspor/usr/share/bash-completion/completions/hasp - Zsh: somewhere in
$fpath - Fish:
~/.config/fish/completions/hasp.fish
- Bash:
- Open a new shell or run the source command for your shell
(
source ~/.bashrc,source ~/.zshrc, etc.).
Dynamic completions
- Ensure the registration snippet is sourced in your shell config:
source <(COMPLETE=bash hasp) - Check that
haspis on$PATHwhen the shell starts. - Set
COMPLETE=to disable and test raw:COMPLETE= bash # Now try completion
backend 'vault' failed: proxy error: ...
- Vault (and other HTTP backends) can route through an HTTP CONNECT proxy.
- Quick fix: set standard environment variables:
export HTTPS_PROXY=http://proxy.corp.example.com:8080 export NO_PROXY="localhost,127.0.0.1" - Or use the explicit
--proxy-urlflag:hasp get --proxy-url http://proxy:8080 vault://secret/data/db - For authenticated proxies, see HTTP CONNECT Proxy.
- AWS backends (
aws-sm://,aws-ssm://) do not yet support explicit proxy configuration. UseHTTPS_PROXYenv vars for those.
Next steps
- Installation — verify your build.
- Supported Backends — per-backend auth details.
- Profile Aliases — config file format.
- Shell Completions — setup instructions.