From 6436a8194eb8af8d3357738d09916edc096c882c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 10 Jan 2022 22:18:55 +0100 Subject: [PATCH] Disable "raw" SSH key usage There is no sane way to get that fallback working with libgit2. Plus, it's not a good practice anyway to have a non-password protected SSH key. --- src/repo.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/repo.rs b/src/repo.rs index 4e35698..f6adb0d 100644 --- a/src/repo.rs +++ b/src/repo.rs @@ -1323,9 +1323,7 @@ fn get_remote_callbacks() -> git2::RemoteCallbacks<'static> { Some(username) => username, None => panic!("Could not get username. This is a bug"), }; - git2::Cred::ssh_key_from_agent(username).or_else(|_| { - git2::Cred::ssh_key(username, None, &crate::env_home().join(".ssh/id_rsa"), None) - }) + git2::Cred::ssh_key_from_agent(username) }); callbacks