Is there any way to get git-annex to respect the GIT_SSH environment variable just like git? This would be super helpful for specifying ssh options (keys in my application)
Hacks like a ~/.ssh/config with a fake hostname to specify the key are not appropriate in my case, because keys are generated on the fly by a server-side application that may be distributed across multiple servers. So I really need to be able to specify a key file at run time and then use the normal remote URI. I can do this with git and GIT_SSH, but have not found a solution for git-annex yet.
I've added support for this now.
However, since git's interface to this doesn't let any options other than -p be passed to the command run by this, git-annex can't either. Which means it can't pass options for ssh connection caching. So, I'm afraid that using
GIT_SSH
will slow things down somewhat. Of course, you can always enable ssh connection caching yourself in either theGIT_SSH
script or the ssh configuration.