diff options
author | 2016-11-07 10:32:57 -0400 | |
---|---|---|
committer | 2016-11-07 10:32:57 -0400 | |
commit | fe266b0916b26d63d89b85bbd83c62ac239af00b (patch) | |
tree | 5f72f57a44eecfba8986a12f8017457e11a74b2c | |
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.
-rw-r--r-- | Annex/Ssh.hs | 6 | ||||
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn | 16 |
3 files changed, 25 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" @@ -3,6 +3,10 @@ git-annex (6.20161032) UNRELEASED; urgency=medium * 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 diff --git a/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn b/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn index ed4973077..eb961030c 100644 --- a/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn +++ b/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn @@ -49,3 +49,19 @@ I would just like to be sure nothing else is hidden. +> [[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]] |