diff --git a/cuddle_cli/src/context.rs b/cuddle_cli/src/context.rs index ca5ed4b..8472a3b 100644 --- a/cuddle_cli/src/context.rs +++ b/cuddle_cli/src/context.rs @@ -110,9 +110,9 @@ fn pull_parent_cuddle_into_local( destination: PathBuf, ) -> anyhow::Result<()> { let mut rc = RemoteCallbacks::new(); - rc.credentials(|_url, _username_from_url, _allowed_types| { + rc.credentials(|_url, username_from_url, _allowed_types| { git2::Cred::ssh_key( - "git", + username_from_url.unwrap(), None, Path::new(&format!("{}/.ssh/id_ed25519", env::var("HOME").unwrap())), None, diff --git a/id_git b/id_git new file mode 100644 index 0000000..ee81ab5 --- /dev/null +++ b/id_git @@ -0,0 +1,7 @@ +-----BEGIN OPENSSH PRIVATE KEY----- +b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW +QyNTUxOQAAACCix8lNGxRN+auRDOljId8JWWp7nleNv4Q0kD3c/gkI8QAAAJBB4Oi7QeDo +uwAAAAtzc2gtZWQyNTUxOQAAACCix8lNGxRN+auRDOljId8JWWp7nleNv4Q0kD3c/gkI8Q +AAAEARiqT4Zvda/VoGZFTY19hNhLc162ZyQ6y48Vy3kCUBCqLHyU0bFE35q5EM6WMh3wlZ +anueV42/hDSQPdz+CQjxAAAADGdpdEAxMC4wLjkuMAE= +-----END OPENSSH PRIVATE KEY----- diff --git a/id_git.pub b/id_git.pub new file mode 100644 index 0000000..95f34d4 --- /dev/null +++ b/id_git.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKLHyU0bFE35q5EM6WMh3wlZanueV42/hDSQPdz+CQjx git@10.0.9.0