Merge pull request #4657 from numerigraphe/fix-key-add-id

Properly report the ID of newly added keys
This commit is contained in:
Michael Eischer 2024-01-31 20:59:41 +00:00 committed by GitHub
commit eaf9659efc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -141,7 +141,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
}