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.
This commit is contained in:
2022-01-10 22:18:55 +01:00
parent f10ae25b2a
commit 6436a8194e

View File

@@ -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