resticprofile icon indicating copy to clipboard operation
resticprofile copied to clipboard

'key add' command fails without input prompt

Open djmattyg007 opened this issue 4 years ago • 1 comments

According to the restic documentation, when I run key add, I should be prompted multiple times when creating a new key. When I run this through the resticprofile wrapper, it appears that stdin is not hooked up to my terminal. I never get prompted, and the process fails.

❯ resticprofile -n myprofile key add
2021/09/18 12:50:18 using configuration file: profiles.yaml
2021/09/18 12:50:18 profile 'myprofile': starting 'key'
repository xxxxxxxx opened successfully, password is correct
reading repository password from stdin
Fatal: an empty password is not a password
2021/09/18 12:50:19 key on profile 'myprofile': exit status 1

djmattyg007 avatar Sep 18 '21 02:09 djmattyg007

That's right, I forgot about this case. I always used key add with the --new-password-file flag 😕

creativeprojects avatar Sep 18 '21 19:09 creativeprojects