mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature: support git.core.askpass (#239)
This commit is contained in:
parent
8fa19ecd0c
commit
cbe4c36525
14 changed files with 211 additions and 60 deletions
|
@ -15,14 +15,10 @@ namespace SourceGit.Commands
|
|||
TraitErrorAsOutput = true;
|
||||
|
||||
var sshKey = new Config(repo).Get($"remote.{remote}.sshkey");
|
||||
if (!string.IsNullOrEmpty(sshKey))
|
||||
{
|
||||
Args = $"-c core.sshCommand=\"ssh -i '{sshKey}'\" ";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(sshKey))
|
||||
Args = "-c credential.helper=manager ";
|
||||
}
|
||||
else
|
||||
UseSSHKey(sshKey);
|
||||
|
||||
Args += "fetch --progress --verbose ";
|
||||
if (prune)
|
||||
|
@ -46,14 +42,10 @@ namespace SourceGit.Commands
|
|||
TraitErrorAsOutput = true;
|
||||
|
||||
var sshKey = new Config(repo).Get($"remote.{remote}.sshkey");
|
||||
if (!string.IsNullOrEmpty(sshKey))
|
||||
{
|
||||
Args = $"-c core.sshCommand=\"ssh -i '{sshKey}'\" ";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(sshKey))
|
||||
Args = "-c credential.helper=manager ";
|
||||
}
|
||||
else
|
||||
UseSSHKey(sshKey);
|
||||
|
||||
Args += $"fetch --progress --verbose {remote} {remoteBranch}:{localBranch}";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue