This commit is contained in:
Dennis Schwerdel 2017-03-22 18:21:48 +01:00 committed by Dennis Schwerdel
parent 205c193108
commit 6f5cb66065
2 changed files with 6 additions and 5 deletions

View File

@ -261,8 +261,8 @@ pub fn parse() -> Arguments {
(@subcommand addkey =>
(about: "adds a key to the respository")
(@arg REPO: +required "path of the repository")
(@arg generate: --generate "generate a new key")
(@arg set_default: --default "set this key as default")
(@arg generate: --generate -g "generate a new key")
(@arg set_default: --default -d "set this key as default")
(@arg FILE: +takes_value "the file containing the keypair")
)
(@subcommand algotest =>

View File

@ -146,13 +146,14 @@ pub fn run() {
}, remote_path).unwrap();
if encryption {
let (public, secret) = gen_keypair();
println!("Public key: {}", to_hex(&public[..]));
println!("Secret key: {}", to_hex(&secret[..]));
println!("public: {}", to_hex(&public[..]));
println!("secret: {}", to_hex(&secret[..]));
repo.set_encryption(Some(&public));
repo.register_key(public, secret).unwrap();
repo.save_config().unwrap();
print_config(&repo.config);
println!();
}
print_config(&repo.config);
},
Arguments::Backup{repo_path, backup_name, src_path, full, reference} => {
let mut repo = open_repository(&repo_path);