I apologize in advance because I'm extremely new to libgit2/git. I was trying to clone a git repository using ssh, and I'm getting an error below:
Error code: -1 Invalid version 0 on git_clone_options
I replaced some paths with arbitrary variables for privacy. I just believe I'm doing the steps improperly.
cred_acquire_cb(git_cred** cred, const char* url, const char* username_from_url, unsigned int allowed_types, void* payload)
{
return git_cred_ssh_key_new(cred, "git", URL, pathToPublicKey, passPhrase);
}
git_repository* repo;
git_remote** remote;
g_options.remote_callbacks.certificate_check;
g_options.remote_callbacks.credentials = cred_acquire_cb;
g_options.remote_cb_payload = pathToCopyTo;
printError(git_clone(&repo, sshURL, pathToCopyTo, &g_options));