Add opts.Username, opts.Hostname to AddKey in the "key passwd" command

so that --user and --host flags work
This commit is contained in:
Matt
2026-04-16 19:15:44 +01:00
parent 1807d269cd
commit 0f8c28aee4
+1 -1
View File
@@ -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)
}