From 0f8c28aee40f4ee1df62785ee6d61c5ebf023923 Mon Sep 17 00:00:00 2001 From: Matt <276692477+mattxtaz2@users.noreply.github.com> Date: Thu, 16 Apr 2026 19:15:44 +0100 Subject: [PATCH] Add opts.Username, opts.Hostname to AddKey in the "key passwd" command so that --user and --host flags work --- cmd/restic/cmd_key_passwd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/cmd_key_passwd.go b/cmd/restic/cmd_key_passwd.go index fad1361da..c45ac96ed 100644 --- a/cmd/restic/cmd_key_passwd.go +++ b/cmd/restic/cmd_key_passwd.go @@ -71,7 +71,7 @@ func changePassword(ctx context.Context, repo *repository.Repository, gopts glob return err } - id, err := repository.AddKey(ctx, repo, pw, "", "", repo.Key()) + id, err := repository.AddKey(ctx, repo, pw, opts.Username, opts.Hostname, repo.Key()) if err != nil { return errors.Fatalf("creating new key failed: %v", err) }