From a211521e79c5657ba20975c2477e7c66d2c4ec79 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Fri, 14 Dec 2012 13:40:49 +0100 Subject: [PATCH] repo git: when setting the url from config, also set the git-bin.sshUrl --- SparkleLib/Git/SparkleRepoGit.cs | 5 ++++- SparkleShare/SparkleControllerBase.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SparkleLib/Git/SparkleRepoGit.cs b/SparkleLib/Git/SparkleRepoGit.cs index 66aed8b0..a5c83ba6 100644 --- a/SparkleLib/Git/SparkleRepoGit.cs +++ b/SparkleLib/Git/SparkleRepoGit.cs @@ -80,9 +80,12 @@ namespace SparkleLib.Git { git.StartAndWaitForExit (); this.use_git_bin = (git.ExitCode == 0); - + git = new SparkleGit (LocalPath, "config remote.origin.url \"" + RemoteUrl + "\""); git.StartAndWaitForExit (); + + git = new SparkleGit (LocalPath, "config git-bin.sshUrl \"" + RemoteUrl + "\""); + git.StartAndWaitForExit (); string password_file_path = Path.Combine (LocalPath, ".git", "password"); diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 5206779e..552543b6 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -253,7 +253,7 @@ namespace SparkleShare { new Thread (() => { string keys_path = Path.GetDirectoryName (SparkleConfig.DefaultConfig.FullPath); - string key_file_name = DateTime.Now.ToString ("yyyy-MM-dd_HH\\hmm"); + string key_file_name = DateTime.Now.ToString ("yyyy-MM-dd_HH\\hmm"); // TODO: move to undercore name for old keys string [] key_pair = SparkleKeys.GenerateKeyPair (keys_path, key_file_name); SparkleKeys.ImportPrivateKey (key_pair [0]);