repo git: when setting the url from config, also set the git-bin.sshUrl

This commit is contained in:
Hylke Bons 2012-12-14 13:40:49 +01:00
parent f609b16083
commit cfc0011386
2 changed files with 5 additions and 2 deletions

View file

@ -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");

View file

@ -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]);