diff --git a/SparkleLib/Git/SparkleGit.cs b/SparkleLib/Git/SparkleGit.cs index aeeab0a0..21372234 100644 --- a/SparkleLib/Git/SparkleGit.cs +++ b/SparkleLib/Git/SparkleGit.cs @@ -49,10 +49,10 @@ namespace SparkleLib.Git { StartInfo.EnvironmentVariables.Add ("GIT_TERMINAL_PROMPT", "0"); if (!string.IsNullOrEmpty (SSHPath)) { - if (StartInfo.EnvironmentVariables.ContainsKey ("GIT_SSH")) - StartInfo.EnvironmentVariables ["GIT_SSH"] = SSHPath; + if (StartInfo.EnvironmentVariables.ContainsKey ("GIT_SSH_COMMAND")) + StartInfo.EnvironmentVariables ["GIT_SSH_COMMAND"] = SSHPath; else - StartInfo.EnvironmentVariables.Add ("GIT_SSH", SSHPath); + StartInfo.EnvironmentVariables.Add ("GIT_SSH_COMMAND", SSHPath); } if (string.IsNullOrEmpty (ExecPath)) diff --git a/SparkleLib/SparkleConfig.cs b/SparkleLib/SparkleConfig.cs index ad75c7cd..4b0b3917 100755 --- a/SparkleLib/SparkleConfig.cs +++ b/SparkleLib/SparkleConfig.cs @@ -145,7 +145,8 @@ namespace SparkleLib { SparkleUser user = new SparkleUser (user_name, user_email); - string [] private_key_file_paths = Directory.GetFiles (Path.GetDirectoryName (FullPath), "*.key"); + string ssh_path = Path.Combine (Path.GetDirectoryName (FullPath), "ssh"); + string [] private_key_file_paths = Directory.GetFiles(ssh_path, "*.key"); if (private_key_file_paths.Length > 0) { user.PrivateKey = File.ReadAllText (private_key_file_paths [0]); diff --git a/SparkleLib/SparkleFetcherSSH.cs b/SparkleLib/SparkleFetcherSSH.cs index 659aca6c..a0264c42 100644 --- a/SparkleLib/SparkleFetcherSSH.cs +++ b/SparkleLib/SparkleFetcherSSH.cs @@ -43,14 +43,14 @@ namespace SparkleLib { return true; string host_key = FetchHostKey (); - + if (string.IsNullOrEmpty (RemoteUrl.Host) || host_key == null) { SparkleLogger.LogInfo ("Auth", "Could not fetch host key"); this.errors.Add ("error: Could not fetch host key"); - + return false; } - + bool warn = true; if (RequiredFingerprint != null) {