From f371f1bd3d92ec595aa4eb76cc2eab9066a1ff31 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 1 Jul 2020 11:04:23 +0200 Subject: [PATCH] git: Read SSH key from data dir. --- src/git.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/git.cpp b/src/git.cpp index cb6c55e..f82b701 100644 --- a/src/git.cpp +++ b/src/git.cpp @@ -59,10 +59,9 @@ int cred_acquire(git_cred **cred, const char * /*url*/, const char *username_from_url, unsigned int /*allowed_types*/, void * /*payload*/) { - // return git_credential_ssh_key_new( - // cred, username_from_url, "/home/tastytea/.ssh/noid_fediblock.pub", - // "/home/tastytea/.ssh/noid_fediblock.pub", ""); - return git_credential_ssh_key_from_agent(cred, username_from_url); + return git_credential_ssh_key_new( + cred, username_from_url, (get_datadir() / "ssh_id.pub").c_str(), + (get_datadir() / "ssh_id").c_str(), nullptr); } void clone()