Files
openidea/crates/ide-ssh/src/lib.rs
T
Deng Liuanddengliu 2841a5a406 feat(vcs,ssh): resolve ~/.ssh/config Host aliases for git remotes (#2399)
A remote that uses an SSH Host alias (git@github-personal:owner/repo.git with Host github-personal → HostName github.com) was not recognised by the GitHub integration (repository detection, tracked branch, Git Log CI checks), which saw the alias instead of the host. vcs_remotes now also reports Remote.resolvedUrl, resolved from ~/.ssh/config and its Includes without running anything (Match exec, ProxyCommand and LocalCommand are never executed; unreadable or malformed config falls back to the literal URL; the parsed config is cached), with ssh.github.com / altssh.gitlab.com normalised. Remote.url stays the literal value shown in Manage Remotes, and the plugin vcs.remotes call keeps returning the configured URL.

Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com>
2026-11-10 03:53:00 +08:00

25 lines
798 B
Rust

//! SSH for every remote feature: configurations and `~/.ssh/config` hosts,
//! host-key trust, authentication (password, key, agent), remote commands and
//! processes, SFTP, local port forwarding, and askpass for `ssh` / `git`.
pub mod askpass;
pub mod filesystem;
pub mod git_creds;
pub mod manager;
pub mod secrets;
pub mod session;
pub mod sftp;
pub mod shell;
pub mod target;
#[cfg(feature = "testing")]
pub mod testing;
pub mod tunnel;
pub use filesystem::{FsConnection, RemoteFs};
pub use manager::SshManager;
pub use russh::Sig;
pub use session::{ConnectError, ExecOutput, Output, RemoteProcess, Session, UnknownHostKey};
pub use sftp::RemoteEntry;
pub use target::{SshFiles, SshTarget, expand, openssh_args, resolve_ssh_remote_url, resolve_ssh_remote_url_with};
pub use tunnel::Tunnel;