Save SSH passwords in Windows Credential Manager and auto-type at prompt
This commit is contained in:
parent
872fb0e80e
commit
1c243b3f3f
11 changed files with 538 additions and 38 deletions
|
|
@ -1,6 +1,7 @@
|
|||
//! Library entry point. `main.rs` calls `run()`.
|
||||
|
||||
mod commands;
|
||||
mod creds;
|
||||
mod hosts;
|
||||
mod pty;
|
||||
|
||||
|
|
@ -15,6 +16,16 @@ pub fn run() {
|
|||
.with_writer(std::io::stderr)
|
||||
.try_init();
|
||||
|
||||
// keyring-core 1.x requires explicit store registration before any
|
||||
// Entry::new() call. We're Windows-only so the Credential Manager
|
||||
// backend is the only choice. Failure here means SSH passwords won't
|
||||
// be retrievable — log and continue (host configs still work without
|
||||
// saved passwords; users just see the prompt and type it manually).
|
||||
match windows_native_keyring_store::Store::new() {
|
||||
Ok(store) => keyring_core::set_default_store(store),
|
||||
Err(e) => tracing::warn!("keyring store init failed: {e}"),
|
||||
}
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_clipboard_manager::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
|
|
@ -29,6 +40,9 @@ pub fn run() {
|
|||
commands::load_workspace,
|
||||
commands::list_ssh_hosts,
|
||||
commands::save_ssh_hosts,
|
||||
commands::set_host_password,
|
||||
commands::delete_host_password,
|
||||
commands::has_host_password,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue