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) {
|
||||
return Result.fail(ex, stackTrace);
|
||||
}
|
||||
} else if (Platform.isMacOS) {
|
||||
await gitPushViaExecutable(
|
||||
} else if (Platform.isMacOS || Platform.isLinux) {
|
||||
await gitFetchViaExecutable(
|
||||
privateKey: config.sshPrivateKey,
|
||||
privateKeyPassword: config.sshPassword,
|
||||
remoteName: remoteName,
|
||||
@ -306,7 +306,7 @@ class GitNoteRepository {
|
||||
Log.e("GitPush Failed", ex: ex, stacktrace: stackTrace);
|
||||
rethrow;
|
||||
}
|
||||
} else if (Platform.isMacOS) {
|
||||
} else if (Platform.isMacOS || Platform.isLinux) {
|
||||
await gitPushViaExecutable(
|
||||
privateKey: config.sshPrivateKey,
|
||||
privateKeyPassword: config.sshPassword,
|
||||
|
@ -68,6 +68,9 @@ Future<Result<void>> _gitCommandViaExecutable({
|
||||
mode: ProcessStartMode.inheritStdio,
|
||||
);
|
||||
|
||||
print('env GIT_SSH_COMMAND="ssh -i ${temp.path} -o IdentitiesOnly=yes"');
|
||||
print('git $command $remoteName');
|
||||
|
||||
var exitCode = await process.exitCode;
|
||||
await dir.delete(recursive: true);
|
||||
|
||||
|
Reference in New Issue
Block a user