Optional user in ssh_remote, allows to fix the key proof in `pijul id ed`

pmeunier
Feb 23, 2023, 7:45 PM
MEK57BADGFCCZDNPUPUZGOJGNNS5R7UWRWCNJELKONGKOLLAQDDAC

Dependencies

  • [2] 4OJWMSOW Fully replace crate::Identity
  • [3] H4AU6QRP New config for HTTP remotes
  • [4] GYXIF25T Proper parsing of URLs
  • [5] CXSCA5HN Fixing a counter-intuitive error when a local repo does not exist
  • [6] 4KJ45IJL Implement new identity management
  • [7] SZWBLWZ4 Reading ~/.ssh/config
  • [8] ZSFJT4SF Allow remotes to have a different push and pull address
  • [9] A3RM526Y Integrating identity malleability
  • [10] 76PCXGML Pushing to, and pulling from the local repository
  • [11] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [12] WKX5S4Z4 remove unneccesary explicit lifetimes

Change contents

  • replacement in pijul/src/remote/ssh.rs at line 52
    [4.26375][4.336:403]()
    pub fn ssh_remote(addr: &str, with_path: bool) -> Option<Remote> {
    [4.26375]
    [4.403]
    pub fn ssh_remote<'a>(user: Option<&str>, addr: &'a str, with_path: bool) -> Option<Remote<'a>> {
  • edit in pijul/src/remote/ssh.rs at line 69
    [4.395]
    [4.27289]
    }
    if let Some(user) = user {
    if !user.is_empty() {
    config.user.clear();
    config.user.push_str(user)
    }
  • edit in pijul/src/remote/mod.rs at line 47
    [4.61]
    [4.53031]
    // User name in case it isn't provided in the `name` argument already.
    user: Option<&str>,
  • replacement in pijul/src/remote/mod.rs at line 57
    [4.53288][4.6096:6181]()
    unknown_remote(self_path, name, channel, no_cert_check, with_path).await
    [4.53288]
    [4.53351]
    unknown_remote(self_path, user, name, channel, no_cert_check, with_path).await
  • replacement in pijul/src/remote/mod.rs at line 71
    [3.454][3.454:523]()
    if let Some(mut sshr) = ssh_remote(ssh, with_path) {
    [3.454]
    [3.523]
    if let Some(mut sshr) = ssh_remote(None, ssh, with_path) {
  • edit in pijul/src/remote/mod.rs at line 111
    [4.242]
    [4.53399]
    user: Option<&str>,
  • replacement in pijul/src/remote/mod.rs at line 131
    [4.543][4.400:465]()
    if let Some(mut ssh) = ssh_remote(name, with_path) {
    [4.543]
    [4.604]
    if let Some(mut ssh) = ssh_remote(user, name, with_path) {
  • replacement in pijul/src/remote/mod.rs at line 174
    [4.55181][4.6277:6334]()
    if let Some(mut ssh) = ssh_remote(name, with_path) {
    [4.55181]
    [4.833]
    if let Some(mut ssh) = ssh_remote(user, name, with_path) {
  • edit in pijul/src/identity/create.rs at line 213
    [2.13387]
    [2.13387]
    debug!("prompt remote {:?}", self.config.author);
  • edit in pijul/src/identity/create.rs at line 314
    [4.37432]
    [4.37432]
    Some(&self.config.author.username),
  • replacement in pijul/src/identity/create.rs at line 326
    [4.37767][4.37767:37854]()
    } else if let Some(mut ssh) = crate::remote::ssh::ssh_remote(&remote, false) {
    [4.37767]
    [4.37854]
    } else if let Some(mut ssh) = crate::remote::ssh::ssh_remote(Some(&self.config.author.username), &remote, false) {
  • edit in pijul/src/commands/pushpull.rs at line 210
    [4.4385]
    [4.4385]
    None,
  • edit in pijul/src/commands/pushpull.rs at line 395
    [4.6011]
    [4.6011]
    None,
  • edit in pijul/src/commands/clone.rs at line 39
    [4.24381]
    [4.24381]
    None,
  • edit in pijul/src/commands/archive.rs at line 79
    [4.8317]
    [4.192281]
    None,