Describe the bug
I want to use age encryption with my ssh keys. I tried setting the AGE_PUBLIC_KEYS_FILE env var to point to a file which contains two comma-separated age recipients with the ssh-ed25519 public key format. Running the backup command results in the following error:
time=2025-02-04T04:41:24.278Z level=INFO msg="Created backup of `/backup` at `/tmp/backup-2025-02-04T04-41-23.tar.gz`."
time=2025-02-04T04:41:24.293Z level=INFO msg="Removed tar file `/tmp/backup-2025-02-04T04-41-23.tar.gz`."
time=2025-02-04T04:41:24.293Z level=ERROR msg="Fatal error running command: malformed recipient \"ssh-ed25519 [REDACTED]\": mixed case" error="main.(*command).runAsCommand: error running script: main.runScript.func4: error running script: main.(*script).encryptArchive: failed to get configured age recipients: main.(*script).getConfiguredAgeRecipients: failed to parse age public key: malformed recipient \"ssh-ed25519 [REDACTED]\": mixed case"
To Reproduce
Steps to reproduce the behavior:
- Create a file named
age_recipients containing two ssh-ed25519 public keys separated by a comma:
ssh-ed25519 [some key],ssh-ed25519 [some key]
- Launch the docker service with a
compose.yml file similar to this:
services:
...
docker-volume-backup:
image: offen/docker-volume-backup:v2
container_name: docker-volume-backup
secrets:
- DOCKER_VOLUME_BACKUP_AGE_PUBLIC_KEYS
environment:
AGE_PUBLIC_KEYS_FILE: /run/secrets/DOCKER_VOLUME_BACKUP_AGE_PUBLIC_KEYS
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
...
- ${HOME}/backup:/archive
secrets:
DOCKER_VOLUME_BACKUP_AGE_PUBLIC_KEYS:
file: ./age_recipients
- Run
docker exec -it docker-volume-backup sh
- Type
backup and press Enter
Expected behavior
An encrypted archive saved to the ~/backup directory
Version (please complete the following information):
- Image Version: v2.43.1
- Docker Version: 27.5.1
- Docker Compose Version (if applicable): v2.32.4
Additional context
Describe the bug
I want to use
ageencryption with my ssh keys. I tried setting theAGE_PUBLIC_KEYS_FILEenv var to point to a file which contains two comma-separated age recipients with the ssh-ed25519 public key format. Running thebackupcommand results in the following error:To Reproduce
Steps to reproduce the behavior:
age_recipientscontaining two ssh-ed25519 public keys separated by a comma:compose.ymlfile similar to this:docker exec -it docker-volume-backup shbackupand press EnterExpected behavior
An encrypted archive saved to the ~/backup directory
Version (please complete the following information):
Additional context