Allow passing args to ssh (#19336)

This is useful for passing a custom identity file, jump hosts, etc.

Unlike with the v1 feature, we won't support `gh`/`gcloud` ssh wrappers
(yet?). I think the right way of supporting those would be to let
extensions provide remote projects.

Closes #19118

Release Notes:

- SSH remoting: restored ability to set arguments for SSH
This commit is contained in:
Conrad Irwin 2024-10-16 21:09:31 -06:00 committed by GitHub
parent f1d01d59ac
commit 378a2cf9d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 216 additions and 89 deletions

View file

@ -21,7 +21,7 @@ use picker::{
use rpc::proto::DevServerStatus;
use serde::Deserialize;
use settings::Settings;
use ssh_connections::SshSettings;
pub use ssh_connections::SshSettings;
use std::{
path::{Path, PathBuf},
sync::Arc,
@ -384,11 +384,13 @@ impl PickerDelegate for RecentProjectsDelegate {
..Default::default()
};
let args = SshSettings::get_global(cx).args_for(&ssh_project.host, ssh_project.port, &ssh_project.user);
let connection_options = SshConnectionOptions {
host: ssh_project.host.clone(),
username: ssh_project.user.clone(),
port: ssh_project.port,
password: None,
args,
};
let paths = ssh_project.paths.iter().map(PathBuf::from).collect();