Skip to content

Using double quotes when specifying BORG_SERVE_ARGS causes incorrect authorized keys generation #35

Description

@SolidEva

setting

  environment:
   - BORG_SERVE_ARGS="--storage-quota 1.5T"

results in the generation of the following authorized keys line:

restrict,command="cd /backup/<hostname>; borg serve --restrict-to-path /backup/<hostname> "--storage-quota 1.5T"" <key-redacted>

which is not a valid authorized keys file

borgserver-1  |  * Validating structure of generated /home/borg/.ssh/authorized_keys...
borgserver-1  | ERROR: /home/borg/.ssh/authorized_keys is not a public key file.

the easy solution is to either use single quotes, or no quotes instead:

  environment:
   - BORG_SERVE_ARGS=--storage-quota 1.5T

but perhaps we should detect when double quotes are used, and error out in a more helpful way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions