Use repository Git remotes and SSH config
Dependency security audit / rustsec (push) Has been cancelled
Dependency security audit / rustsec (push) Has been cancelled
This commit is contained in:
1 parent
a3da9fda69
commit
300ccf5f1f
7 files changed
+316
-23
No files matched your search
@@ -892,13 +892,11 @@ pub fn confirm_ssh_host(remote: &GitRemote, host_key: &SshHostKey) -> Result<(),
|
||||
.endpoint()
|
||||
.as_ssh()
|
||||
.ok_or(GitError::SshAuthenticationNotConfigured)?;
|
||||
if endpoint.host() != host_key.host() || endpoint.port() != host_key.port() {
|
||||
let connection = crate::ssh::resolve_connection(endpoint, remote.ssh_authentication())?;
|
||||
if connection.host != host_key.host() || connection.port != host_key.port() {
|
||||
return Err(GitError::SshProtocolFailed);
|
||||
}
|
||||
let authentication = remote
|
||||
.ssh_authentication()
|
||||
.ok_or(GitError::SshAuthenticationNotConfigured)?;
|
||||
crate::ssh::persist_confirmed_host(authentication.known_hosts_file(), host_key)
|
||||
crate::ssh::persist_confirmed_host(&connection.known_hosts, host_key)
|
||||
}
|
||||
|
||||
pub trait GitSmartHttpTransport {
|
||||
|
||||
Reference in new issue
Block a user