Troubleshooting
Common Polycrate CLI problems with Docker, installation, encryption, blocks, actions and SSH – with causes and fixes.
This guide covers the most common Polycrate CLI problems. Start by checking your version with polycrate version and update with polycrate update if needed.
Docker and containers
Cannot connect to the Docker daemon
Check that the container runtime is running and your user can access its socket:
docker ps
# Linux (systemd)
sudo systemctl start docker
sudo usermod -aG docker "$USER" && newgrp docker
On macOS, start your runtime (OrbStack, Colima or Docker Desktop).
permission denied on workspace files
Actions run as root inside the container. After a hard abort (e.g. SIGKILL, OOM), files – often under artifacts/secrets/<block>/ – may be owned by root. Hand them back without sudo:
polycrate workspace fix-permissions --dry-run
polycrate workspace fix-permissions
Without Docker or after --local runs, use sudo chown -R "$(id -u):$(id -g)" <workspace>.
Image pull or build fails
docker login registry.acme.corp # private registry
polycrate run my-block install --pull=false # use the image already present locally
docker build -f Dockerfile.poly -t polycrate-debug . # test Dockerfile.poly on its own
The Polycrate image is Debian-based – use apt-get in Dockerfile.poly, not apk.
Installation and updates
polycrate: command not found
The installer places the binary at ~/.local/bin/polycrate. Add it to your PATH:
export PATH="$HOME/.local/bin:$PATH"
polycrate update does not replace the binary
If polycrate lives under /Cellar/ (Homebrew) or /nix/store/, polycrate update refuses to overwrite it. If the CLI cannot write to the target directory and cannot use sudo, it stops and prints the manual install command. In both cases, reinstall with the official installer into ~/.local/bin. → Installation & Updates
Workspace and encryption
Workspace config not found
Polycrate cannot find a workspace.poly. Change into the workspace directory or pass the path with -w:
polycrate run my-block install -w ~/.polycrate/workspaces/acme/acme-production-1
FATAL: Workspace contains encrypted files
The workspace contains .age files (secrets.poly.age, artifacts/secrets/*.age) and must be decrypted before a run:
polycrate workspace decrypt
no workspace key found or key does not match encrypted file
Polycrate takes the age key from the Polycrate API (after polycrate login) or from WORKSPACE_ENCRYPTION_KEY:
polycrate workspace status # check key source and encrypted files
export WORKSPACE_ENCRYPTION_KEY="AGE-SECRET-KEY-1..."
polycrate workspace decrypt
Commit blocked: UNENCRYPTED secrets detected
The pre-commit hook keeps plaintext secrets out of Git. Encrypt before committing:
polycrate workspace encrypt
polycrate git add --all
polycrate git commit -m "chore: update encrypted secrets"
Blocks and registry
Block not found
Make sure from: in workspace.poly contains the full registry path with version, then pull missing blocks:
polycrate block list --no-pager
polycrate block pull registry.acme.corp/acme/k8s/my-block:1.0.0
polycrate workspace update # every referenced block
polycrate run my-block install --blocks-auto-pull
block pull requires a version
block pull always expects BLOCK:VERSION, e.g. polycrate block pull cargo.ayedo.cloud/ayedo/k8s/cert-manager:<version>. polycrate hub inspect ayedo/k8s/cert-manager lists the available versions.
block push fails
| Message | Fix |
|---|---|
has no registry path |
name: in block.poly or from: must include a registry host, e.g. registry.acme.corp/acme/k8s/my-block |
has no entry in "CHANGELOG.poly" |
Add a changelog entry with message and email for the version, e.g. polycrate release --block <name> update <version> … |
is missing "examples.poly" |
Create examples.poly with at least one example next to block.poly; check it with polycrate block examples <block> --no-pager |
authentication required / denied |
Run docker login <registry> |
Do not pass a :tag to block push – the version comes from block.poly. → Registry & Hub
Local block differs from the registry
polycrate block verify my-block --diff
lists the files that differ from the registry image.
Actions and Ansible
Narrow down a failing action
Polycrate writes all output straight to stdout/stderr. Work through it step by step:
# 1. Check the resolved configuration without running anything
polycrate run my-block install --snapshot
# 2. More verbose CLI and Ansible output
polycrate run my-block install --loglevel 2 \
--ansible-stdout-callback ansible.builtin.default \
--ansible-callback-result-format yaml
# 3. Shell in the identically configured container
polycrate debug
# 4. Review past runs
polycrate history actions
{{ … }} or ${VAR} in .poly files is not substituted
.poly files are static YAML. Put values in secrets.poly and use Jinja2 only in playbooks and .j2 templates. → Configuration
SSH
Permission denied (publickey)
ls -la artifacts/secrets/id_rsa artifacts/secrets/id_rsa.pub
chmod 600 artifacts/secrets/id_rsa
polycrate ssh exec <host> true
Make sure artifacts/secrets/id_rsa.pub is in the host's authorized_keys. If the workspace uses config.sshkeysource: user, check ssh.user_key_path in ~/.polycrate/polycrate.yml.
Mount error with SSH_AUTH_SOCK (macOS)
The host SSH agent is not mounted by default. If you hit a socket mount error, remove --ssh-agent-mount or config.sshagentmount: true and use the workspace key.
polycrate ssh tunnel: administratively prohibited
Set AllowTcpForwarding yes in /etc/ssh/sshd_config on the target host and reload sshd (systemctl reload sshd).
Getting help
- Check the CLI Reference and
polycrate <command> --help. - Ask in the Polycrate community on Discord.
- Customers of the ayedo Software Delivery Platform can reach our team via the contact page. Include the output of
polycrate version, the error message and a relevant--snapshotexcerpt without secrets.