diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-11-07 10:32:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-11-07 10:32:57 -0400 |
commit | fe266b0916b26d63d89b85bbd83c62ac239af00b (patch) | |
tree | 5f72f57a44eecfba8986a12f8017457e11a74b2c /Annex | |
parent | f5086b911bea273a18d12c9eb2a5b1d6655a0c55 (diff) |
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.
This commit was sponsored by Josh Taylor on Patreon.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Ssh.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 43c2c13a9..4377de4c5 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -56,8 +56,12 @@ sshOptions (host, port) gc opts = go =<< sshCachingInfo (host, port) -- 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" |