-- If it did, a more expensive test would be needed.
liftIO $ unlessM (doesFileExist overideconfigfile) $
viaTmp writeFile overideconfigfile $ unlines
+ -- Make old version of ssh that does
+ -- not know about Include ignore those
+ -- entries.
+ [ "IgnoreUnknown Include"
-- ssh expands "~"
- [ "Include ~/.ssh/config"
+ , "Include ~/.ssh/config"
-- ssh will silently skip the file
-- if it does not exist
, "Include /etc/ssh/ssh_config"
* Restarting a crashing git process could result in filename encoding
issues when not in a unicode locale, as the restarted processes's
handles were not read in raw mode.
+ * Make .git/annex/ssh.config file work with versions of ssh older than
+ 7.3, which don't support Include. When used with an older version
+ of ssh, any ServerAliveInterval in ~/.ssh/config will be overridden
+ by .git/annex/ssh.config.
-- Joey Hess <id@joeyh.name> Tue, 01 Nov 2016 14:02:06 -0400
+> [[fixed|done]] by adding "IgnoreUnknown Include"
+> to the top of `.git/annex/ssh_config`. Thus supporting the old ssh
+> version without needing to probe for its version number.
+>
+> IgnoreUnknown itself was added back in ssh 6.4, in 2013, so
+> using git-annex with such an old ssh will still not work, but
+> such an old ssh probably has security holes anyway. (Debian oldstable has
+> such an old version of ssh, but Debian stable has 6.5.)
+>
+> I decided not to update existing `.git/annex/ssh_config`
+> since a) the user may have edited it and b) it would slow down every call
+> git-annex makes to ssh and c) as noted this problem makes git-annex mark
+> remotes as annex-ignore, and the user will need to manually edit
+> .git/config to remove that in order to recover from the problem, so might
+> as well remove `.git/annex/ssh_config` too.
+> --[[Joey]]