mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-08-14 17:41:30 +08:00
Desktop: Enable fetch/push on linux
This commit is contained in:
@ -219,8 +219,8 @@ class GitNoteRepository {
|
|||||||
} on Exception catch (ex, stackTrace) {
|
} on Exception catch (ex, stackTrace) {
|
||||||
return Result.fail(ex, stackTrace);
|
return Result.fail(ex, stackTrace);
|
||||||
}
|
}
|
||||||
} else if (Platform.isMacOS) {
|
} else if (Platform.isMacOS || Platform.isLinux) {
|
||||||
await gitPushViaExecutable(
|
await gitFetchViaExecutable(
|
||||||
privateKey: config.sshPrivateKey,
|
privateKey: config.sshPrivateKey,
|
||||||
privateKeyPassword: config.sshPassword,
|
privateKeyPassword: config.sshPassword,
|
||||||
remoteName: remoteName,
|
remoteName: remoteName,
|
||||||
@ -306,7 +306,7 @@ class GitNoteRepository {
|
|||||||
Log.e("GitPush Failed", ex: ex, stacktrace: stackTrace);
|
Log.e("GitPush Failed", ex: ex, stacktrace: stackTrace);
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
} else if (Platform.isMacOS) {
|
} else if (Platform.isMacOS || Platform.isLinux) {
|
||||||
await gitPushViaExecutable(
|
await gitPushViaExecutable(
|
||||||
privateKey: config.sshPrivateKey,
|
privateKey: config.sshPrivateKey,
|
||||||
privateKeyPassword: config.sshPassword,
|
privateKeyPassword: config.sshPassword,
|
||||||
|
@ -68,6 +68,9 @@ Future<Result<void>> _gitCommandViaExecutable({
|
|||||||
mode: ProcessStartMode.inheritStdio,
|
mode: ProcessStartMode.inheritStdio,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
print('env GIT_SSH_COMMAND="ssh -i ${temp.path} -o IdentitiesOnly=yes"');
|
||||||
|
print('git $command $remoteName');
|
||||||
|
|
||||||
var exitCode = await process.exitCode;
|
var exitCode = await process.exitCode;
|
||||||
await dir.delete(recursive: true);
|
await dir.delete(recursive: true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user