diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-13 12:05:05 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-13 12:12:38 -0400 |
commit | f1f846bfce78f6ee82eccd93e3dbb0bd1d559e8a (patch) | |
tree | 09e92fcac0c6f0a1cdd4899f6ad33ae1f7585570 /Annex | |
parent | 0e4bd345ac17e95b1e2d0b547d1c7be669a00af1 (diff) |
Revert ServerAliveInterval
Revert ServerAliveInterval change in 6.20161111, which caused problems
with too many old versions of ssh and unusual ssh configurations.
It should have not been needed anyway since ssh is supposted to
have TCPKeepAlive enabled by default.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Locations.hs | 5 | ||||
-rw-r--r-- | Annex/Ssh.hs | 39 |
2 files changed, 7 insertions, 37 deletions
diff --git a/Annex/Locations.hs b/Annex/Locations.hs index 9f829fda1..a6af4d417 100644 --- a/Annex/Locations.hs +++ b/Annex/Locations.hs @@ -63,7 +63,6 @@ module Annex.Locations ( gitAnnexUrlFile, gitAnnexTmpCfgFile, gitAnnexSshDir, - gitAnnexSshConfig, gitAnnexRemotesDir, gitAnnexAssistantDefaultDir, HashLevels(..), @@ -403,10 +402,6 @@ gitAnnexTmpCfgFile r = gitAnnexDir r </> "config.tmp" gitAnnexSshDir :: Git.Repo -> FilePath gitAnnexSshDir r = addTrailingPathSeparator $ gitAnnexDir r </> "ssh" -{- .git/annex/ssh.config is used to configure ssh. -} -gitAnnexSshConfig :: Git.Repo -> FilePath -gitAnnexSshConfig r = gitAnnexDir r </> "ssh.config" - {- .git/annex/remotes/ is used for remote-specific state. -} gitAnnexRemotesDir :: Git.Repo -> FilePath gitAnnexRemotesDir r = addTrailingPathSeparator $ gitAnnexDir r </> "remotes" diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 4377de4c5..4f879436b 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -33,7 +33,6 @@ import qualified Git.Url import Config import Annex.Path import Utility.Env -import Utility.Tmp import Types.CleanupActions import Git.Env #ifndef mingw32_HOST_OS @@ -50,37 +49,13 @@ sshOptions (host, port) gc opts = go =<< sshCachingInfo (host, port) go (Just socketfile, params) = do prepSocket socketfile ret params - ret ps = do - overideconfigfile <- fromRepo gitAnnexSshConfig - -- We assume that the file content does not change. - -- 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" - -- ssh will silently skip the file - -- if it does not exist - , "Include /etc/ssh/ssh_config" - -- Everything below this point is only - -- used if there's no setting for it in - -- the above files. - -- - -- Make sure that ssh detects stalled - -- connections. - , "ServerAliveInterval 60" - ] - return $ concat - [ ps - , [Param "-F", File overideconfigfile] - , map Param (remoteAnnexSshOptions gc) - , opts - , portParams port - , [Param "-T"] - ] + ret ps = return $ concat + [ ps + , map Param (remoteAnnexSshOptions gc) + , opts + , portParams port + , [Param "-T"] + ] {- Returns a filename to use for a ssh connection caching socket, and - parameters to enable ssh connection caching. -} |