Closed beaugunderson closed 13 years ago
First thanks for your patch.
Wouldn't it be a problem to set GIT_SSH to its default if someone needs to set GIT_SSH to a custom script to get past a firewall?
The SparkleFetcherGit.cs fix looks good to me, but I first want to get it in sync with the linux version and have hbons/SparkleShare#327 merged. I'll try to look at it this weekend.
Re: GIT_SSH, that does make sense... It seems like SparkleShare currently makes an assumption that GIT_SSH points to a 'regular' ssh binary, though, or at least something that can talk to ssh-agent... One route might be to see if GIT_SSH contains 'plink.exe' and ask the user what they want to do if that's the case? Maybe the ssh-agent code can be contingent on GIT_SSH not containing plink.exe, and if it does contain plink.exe SparkleShare can give the user a hint that it will try to use a key that's loaded via pageant?
My target is that is someone installs msysgit and double clicks on SparkleShare.exe, it should work. That's why I automatically modify the path and start ssh-agent. And SparkleShare creates it's own keypair without passphrase, so ssh-add works automatically.
But if an (advanced) user configures git/ssh to some custom settings, those settings should be used instead. I think it is best to assume that if someone does that, he/she must know how to configure it properly. And I can imagine some users will not use the keypair created by SparkleShare, simply because the private key has no passphrase.
But I think I should first test myself what happens when GIT_SSH contains 'plink.exe', before I can comment on this. I'm not an expert on this.
Sorry for the delay. I now have merged this, but left the change regarding GIT_SSH out. I will look again at that later, but at this moment I do not want to override GIT_SSH in case someone needs a particular value.
I added the GIT_SSH environment variable and set it to "ssh" so that git will use ssh-agent; I also fixed a bug where SparkleShare creates an exclude file within the "info" directory without checking if the "info" directory exists.
I use msysGit on my machine with plink, I think that's why I had to set the GIT_SSH environment variable (I'm sure there are others who may set this in their environment as well).