mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
optimize<SSH>: using core.sshCommand instead of environment parameter GIT_SSH_COMMAND
This commit is contained in:
parent
fc43edb6d2
commit
1c10d9a286
6 changed files with 16 additions and 30 deletions
|
@ -15,9 +15,8 @@ namespace SourceGit.Commands {
|
|||
handler = outputHandler;
|
||||
onError = errHandler;
|
||||
|
||||
if (!string.IsNullOrEmpty(sshKey)) {
|
||||
Envs.Add("GIT_SSH_COMMAND", $"ssh -i '{sshKey}'");
|
||||
Args = "";
|
||||
if (string.IsNullOrEmpty(sshKey)) {
|
||||
Args = $"-c core.sshCommand=\"ssh -i '{sshKey}'\" ";
|
||||
} else {
|
||||
Args = "-c credential.helper=manager ";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue