repo git: add private key info when using git-bin

This commit is contained in:
Hylke Bons 2012-12-14 17:03:00 +01:00
parent cfc0011386
commit 7cf1e375e9

View file

@ -80,12 +80,17 @@ namespace SparkleLib.Git {
git.StartAndWaitForExit ();
this.use_git_bin = (git.ExitCode == 0);
if (this.use_git_bin) {
git = new SparkleGit (LocalPath, "config git-bin.sshUrl \"" + RemoteUrl + "\"");
git.StartAndWaitForExit ();
git = new SparkleGit (LocalPath, "config git-bin.sshPrivateKeyFile \"" + config.User.PrivateKeyFilePath + "\"");
git.StartAndWaitForExit ();
}
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");