diff --git a/changelog/unreleased/issue-4656 b/changelog/unreleased/issue-4656 new file mode 100644 index 000000000..8d16f0b48 --- /dev/null +++ b/changelog/unreleased/issue-4656 @@ -0,0 +1,7 @@ +Bugfix: Properly report the ID of newly added keys + +`restic key add` now reports the ID of a newly added key. This simplifies +selecting a specific key using the `--key-hint key` option. + +https://github.com/restic/restic/issues/4656 +https://github.com/restic/restic/pull/4657 diff --git a/cmd/restic/cmd_key.go b/cmd/restic/cmd_key.go index 8309f8382..acd4a029e 100644 --- a/cmd/restic/cmd_key.go +++ b/cmd/restic/cmd_key.go @@ -142,7 +142,7 @@ func addKey(ctx context.Context, repo *repository.Repository, gopts GlobalOption return err } - Verbosef("saved new key as %s\n", id) + Verbosef("saved new key with ID %s\n", id.ID()) return nil }