mirror of
https://github.com/octoleo/restic.git
synced 2024-11-21 20:35:12 +00:00
Properly report the ID of newly added keys
Other commands like key list and key remove show the key's ID. Showing the ID here lets users easily reuse the ID as a key hint for subsequent commands. In particular, a key hint is needed when the repository has many keys - otherwise opening the repository may fail with "Fatal: maximum number of keys reached" even when a proper password is provided. Fixes #4656
This commit is contained in:
parent
446167ae80
commit
8fbe328371
7
changelog/unreleased/issue-4656
Normal file
7
changelog/unreleased/issue-4656
Normal 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
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user