1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-07-24 16:16:00 +00:00

Add support for ssh clone

This commit is contained in:
2025-02-21 15:50:27 +01:00
parent 5683db69c7
commit 884488b9ed
16 changed files with 558 additions and 184 deletions

@ -18,17 +18,7 @@ GitJob::~GitJob()
git_libgit2_shutdown();
}
bool GitJob::getUsername(char **username, QString maybe_username, const char *username_from_url)
{
if (username_from_url) {
*username = strdup(username_from_url);
return true;
} else if (!maybe_username.isNull()) {
*username = maybe_username.toLocal8Bit().data();
return true;
}
return false;
}
int GitJob::credentialsCB(git_cred **out, const char *url, const char *username_from_url,
unsigned int allowed_types, void *payload)

@ -1,6 +1,7 @@
#ifndef GITJOB_H
#define GITJOB_H
#include <QDir>
#include <QThread>
extern "C" {
#include <git2.h>