str4d / rage

A simple, secure and modern file encryption tool (and Rust library) with small explicit keys, no config options, and UNIX-style composability.
https://age-encryption.org/v1
Apache License 2.0
2.53k stars 97 forks source link

chezmoi add --encrypt missing recipient #489

Closed east4ming closed 5 months ago

east4ming commented 5 months ago

Environment

What were you trying to do

configed with rage, and rage installed.

chezmoi add --encrypt ~/.ssh/id_ed25519 --verbose --debug

What happened

🦄 chezmoi add --encrypt ~/.ssh/id_ed25519 --verbose --debug
time=2024-03-20T10:47:48.172+08:00 level=INFO msg=persistentPreRunRootE version.version=2.47.2 version.commit=f4904293d9e3d5297f481b0b1ec00981716fff39 version.date=2024-03-17T18:42:28Z version.builtBy=goreleaser args="[chezmoi add --encrypt /home/casey/.ssh/id_ed25519 --verbose --debug]" goVersion=go1.22.1
time=2024-03-20T10:47:48.172+08:00 level=INFO msg=Stat component=system name=/home/casey/.config/chezmoi/chezmoistate.boltdb
time=2024-03-20T10:47:48.172+08:00 level=ERROR msg=Mkdir component=system err="mkdir /home/casey/.local/share/chezmoi: file exists" name=/home/casey/.local/share/chezmoi perm=511
time=2024-03-20T10:47:48.172+08:00 level=INFO msg=Stat component=system name=/home/casey/.local/share/chezmoi
time=2024-03-20T10:47:48.172+08:00 level=INFO msg=Stat component=system name=/home/casey/.local/share/chezmoi/.git
time=2024-03-20T10:47:48.172+08:00 level=ERROR msg=Mkdir component=system err="mkdir /home/casey/.local/share/chezmoi: file exists" name=/home/casey/.local/share/chezmoi perm=511
time=2024-03-20T10:47:48.172+08:00 level=INFO msg=Stat component=system name=/home/casey/.local/share/chezmoi
time=2024-03-20T10:47:48.172+08:00 level=ERROR msg=ReadFile component=system err="open /home/casey/.local/share/chezmoi/.chezmoiroot: no such file or directory" name=/home/casey/.local/share/chezmoi/.chezmoiroot size=0 data=""
time=2024-03-20T10:47:48.173+08:00 level=ERROR msg=ReadFile component=system err="open /home/casey/.local/share/chezmoi/.chezmoiversion: no such file or directory" name=/home/casey/.local/share/chezmoi/.chezmoiversion size=0 data=""
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=Stat component=system name=/home/casey/.local/share/chezmoi
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=Stat component=system name=/home/casey/.local/share/chezmoi
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=ReadDir component=system name=/home/casey/.local/share/chezmoi
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=ReadDir component=system name=/home/casey/.local/share/chezmoi/dot_cargo
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=ReadDir component=system name=/home/casey/.local/share/chezmoi/private_dot_bash
time=2024-03-20T10:47:48.173+08:00 level=INFO msg=ReadDir component=system name=/home/casey/.local/share/chezmoi/private_dot_ssh
time=2024-03-20T10:47:48.174+08:00 level=INFO msg=ReadDir component=system name=/home/casey/.local/share/chezmoi/private_dot_zsh
time=2024-03-20T10:47:48.174+08:00 level=INFO msg=ReadFile component=system name=/home/casey/.ssh/id_ed25519 size=419 data="-.xxxxxxx."
Error: 缺少接收方。
您是否忘记指定 -r/--recipient 标记?

[ rage 的行为与您的预期不符吗? 或是某个错误消息可包含更多信息? ]
[ 请与我们分享: https://str4d.xyz/rage/report                  ]
time=2024-03-20T10:47:48.177+08:00 level=ERROR msg=Output err="exit status 1" cmd="/usr/bin/rage --armor --encrypt" duration=2.994108ms size=0 output="" exitCode=1 systemTime=2.872ms
time=2024-03-20T10:47:48.177+08:00 level=ERROR msg=Encrypt component=encryption err="exit status 1" plaintext="-xxxxxxxx.." ciphertext=""
chezmoi: exit status 1
east4ming commented 5 months ago

Found in the documentation.