start client public auth

This commit is contained in:
nora 2024-08-23 15:02:29 +02:00
parent 157d6081b8
commit 85f1def4b5
9 changed files with 132 additions and 16 deletions

View file

@ -1,4 +1,5 @@
use std::{
fmt::Display,
io::Write,
path::{Path, PathBuf},
};
@ -28,9 +29,9 @@ enum Subcommand {
},
/// Generate a new SSH key
Generate {
#[arg(short, long = "type")]
#[arg(short, long = "type", default_value_t = KeyType::Ed25519)]
type_: KeyType,
#[arg(short, long)]
#[arg(short, long, default_value_t = String::default())]
comment: String,
#[arg(short, long)]
path: PathBuf,
@ -55,6 +56,14 @@ enum KeyType {
Ed25519,
}
impl Display for KeyType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Ed25519 => f.write_str("ed25519"),
}
}
}
fn main() -> eyre::Result<()> {
let args = Args::parse();