git: Read SSH key from data dir.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tastytea 2020-07-01 11:04:23 +02:00
parent 1512be385e
commit f371f1bd3d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

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