Reading ~/.ssh/config
[?]
Dec 4, 2020, 7:44 PM
SZWBLWZ4LUJZHTSYOIGJMXM7KPCGWJFPKLHYA5MHY7UTPNLZV5KQCDependencies
- [2]
367UBQ6KForwarding SSH stderr, and progress bar for push - [3]
WLUID7NADo not block when downloading more than 100 changes over SSH - [4]
WIORLB47Version bump - [5]
76PCXGMLPushing to, and pulling from the local repository - [6]
5BRU2RRWCleanup (debugging a crash related to trees/inodes) - [7]
NX5I5H53New published versions - [8]
WI5BS6BSNew published versions - [9]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [10]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [11]
RR65HCKOThrussh versions - [12]
3S4DR77ZVersion updates - [13]
2K7JLB4ZNo pager on Windows - [14]
SAGSYAPXVarious version bumps - [15]
OUWD436AVersion bump - [16]
OCBM7IFENew release: pijul-1.0.0-alpha.8 - [17]
UDHP4ZVBFixing SSH asynchronicity issues
Change contents
- edit in pijul/src/remote/ssh.rs at line 1
use std::borrow::Cow; - edit in pijul/src/remote/ssh.rs at line 40
addr: &'a str, - edit in pijul/src/remote/ssh.rs at line 42
port: u16,user: Cow<'a, str>, - replacement in pijul/src/remote/ssh.rs at line 43
addr: String,resolved: std::net::SocketAddr,config: thrussh_config::Config, - edit in pijul/src/remote/ssh.rs at line 53
let user = if let Some(u) = cap.name("user") {Cow::Borrowed(u.as_str())} else {Cow::Owned(whoami::username())}; - replacement in pijul/src/remote/ssh.rs at line 54
let port: u16 = cap.name("port").map(|x| x.as_str().parse().unwrap()).unwrap_or(22);let path = cap.name("path").unwrap().as_str();let addr = format!("{}:{}", host, port);use std::net::ToSocketAddrs;if let Ok(mut res) = addr.to_socket_addrs() {let resolved = res.next().unwrap();Some(Remote {host,port,user,path,addr,resolved,})} else {Nonelet mut config =thrussh_config::parse_home(&host).unwrap_or(thrussh_config::Config::default(host));if let Some(port) = cap.name("port").map(|x| x.as_str().parse().unwrap()) {config.port = port}if let Some(u) = cap.name("user") {config.user.clear();config.user.push_str(u.as_str()); - edit in pijul/src/remote/ssh.rs at line 64
let path = cap.name("path").unwrap().as_str();Some(Remote {addr,host,path,config,}) - replacement in pijul/src/remote/ssh.rs at line 74
pub async fn connect(&self, name: &str, channel: &str) -> Result<Ssh, anyhow::Error> {pub async fn connect(&mut self, name: &str, channel: &str) -> Result<Ssh, anyhow::Error> { - replacement in pijul/src/remote/ssh.rs at line 80
addr: self.addr.clone(),addr: self.config.host_name.clone(), - edit in pijul/src/remote/ssh.rs at line 85
let stream = self.config.stream().await?; - replacement in pijul/src/remote/ssh.rs at line 87
use std::net::ToSocketAddrs;debug!("client: {:?}", client.addr);let addr = client.addr.to_socket_addrs()?.next().unwrap();let mut h = thrussh::client::connect(config, &addr, client).await?;let mut h = thrussh::client::connect_stream(config, stream, client).await?; - replacement in pijul/src/remote/ssh.rs at line 92
let authenticated = self.auth_agent(&mut h).await.unwrap_or(false)let authenticated = self.auth_agent(&mut h, &mut key_path).await.unwrap_or(false) - replacement in pijul/src/remote/ssh.rs at line 121
async fn auth_agent(&self, h: &mut thrussh::client::Handle) -> Result<bool, anyhow::Error> {async fn auth_agent(&self,h: &mut thrussh::client::Handle,key_path: &mut PathBuf,) -> Result<bool, anyhow::Error> { - replacement in pijul/src/remote/ssh.rs at line 128
let identities = agent.request_identities().await?;let identities = if let Some(ref file) = self.config.identity_file {key_path.push(file);key_path.set_extension("pub");let k = thrussh_keys::load_public_key(&key_path);key_path.pop();if let Ok(k) = k {vec![k]} else {return Ok(false);}} else {agent.request_identities().await?}; - replacement in pijul/src/remote/ssh.rs at line 148
match h.authenticate_future(self.user.as_ref(), key, a).await {match h.authenticate_future(&self.config.user, key, a).await { - replacement in pijul/src/remote/ssh.rs at line 178
for k in &["id_ed25519", "id_rsa"] {let mut keys = Vec::new();if let Some(ref file) = self.config.identity_file {keys.push(file.as_str())} else {keys.push("id_ed25519");keys.push("id_rsa");}for k in keys.iter() { - replacement in pijul/src/remote/ssh.rs at line 194
.authenticate_publickey(self.user.as_ref(), Arc::new(k)).authenticate_publickey(&self.config.user, Arc::new(k)) - replacement in pijul/src/remote/ssh.rs at line 210
self.user, self.hostself.config.user, self.config.host_name - replacement in pijul/src/remote/ssh.rs at line 212
h.authenticate_password(self.user.to_string(), &pass).awaith.authenticate_password(self.config.user.to_string(), &pass).await - edit in pijul/src/remote/ssh.rs at line 327
}fn channel_eof(self,_channel: thrussh::ChannelId,session: thrussh::client::Session,) -> Self::FutureUnit {Box::pin(async move {*self.state.lock().await = State::None;Ok((self, session))}) - edit in pijul/src/remote/ssh.rs at line 347
debug!("extended data {:?}, {:?}", std::str::from_utf8(data), ext); - replacement in pijul/src/remote/ssh.rs at line 351
let mut stderr = std::io::stderr();let result = stderr.write_all(data);let stderr = std::io::stderr();let mut handle = stderr.lock();let result = handle.write_all(data); - edit in pijul/src/remote/ssh.rs at line 747
if c.is_empty() {return Ok(());} - replacement in pijul/src/remote/mod.rs at line 63
return if let Some(ssh) = ssh_remote(name) {return if let Some(mut ssh) = ssh_remote(name) { - replacement in pijul/src/remote/mod.rs at line 97
if let Some(ssh) = ssh_remote(name) {if let Some(mut ssh) = ssh_remote(name) { - replacement in pijul/Cargo.toml at line 59
thrussh = "0.29.13"thrussh = "0.29.15" - edit in pijul/Cargo.toml at line 61
thrussh-config = "0.4"