Browse files

Fix #844

  • Loading branch information...
1 parent 2f3af14 commit 1de917a71a5e09516bc59ebac626fc8d9ca725e0 @bitprophet bitprophet committed Mar 1, 2013
Showing with 11 additions and 19 deletions.
  1. +4 −0 docs/changelog.rst
  2. +1 −1 docs/usage/execution.rst
  3. +1 −2 fabric/network.py
  4. +5 −5 tests/support/ssh_config
  5. +0 −11 tests/test_network.py
View
4 docs/changelog.rst
@@ -25,6 +25,10 @@ would have also been included in the 1.2 line.
Changelog
=========
+* :bug:`844` Account for SSH config overhaul in Paramiko 1.10 by e.g. updating
+ treatment of ``IdentityFile`` to handle multiple values. **This and related
+ SSH config parsing changes are backwards incompatible**; we are including
+ them in this release because they do fix incorrect, off-spec behavior.
* :bug:`843` Ensure string ``pool_size`` values get run through ``int()``
before deriving final result (stdlib ``min()`` has odd behavior here...).
Thanks to Chris Kastorff for the catch.
View
2 docs/usage/execution.rst
@@ -785,7 +785,7 @@ If enabled, the following SSH config directives will be loaded and honored by Fa
regular ``ssh``. So a ``Host foo`` entry specifying ``HostName example.com``
will allow you to give Fabric the hostname ``'foo'`` and have that expanded
into ``'example.com'`` at connection time.
-* ``IdentityFile`` will append to (not replace) :ref:`env.key_filename
+* ``IdentityFile`` will extend (not replace) :ref:`env.key_filename
<key-filename>`.
* ``ForwardAgent`` will augment :ref:`env.forward_agent <forward-agent>` in an
"OR" manner: if either is set to a positive value, agent forwarding will be
View
3 fabric/network.py
@@ -169,10 +169,9 @@ def key_filenames():
# Strip out any empty strings (such as the default value...meh)
keys = filter(bool, keys)
# Honor SSH config
- # TODO: fix ssh so it correctly treats IdentityFile as a list
conf = ssh_config()
if 'identityfile' in conf:
- keys.append(conf['identityfile'])
+ keys.extend(conf['identityfile'])
return map(os.path.expanduser, keys)
View
10 tests/support/ssh_config
@@ -1,12 +1,12 @@
-Host *
- User satan
- Port 666
- IdentityFile foobar.pub
-
Host myhost
User neighbor
Port 664
IdentityFile neighbor.pub
Host myalias
HostName otherhost
+
+Host *
+ User satan
+ Port 666
+ IdentityFile foobar.pub
View
11 tests/test_network.py
@@ -675,14 +675,3 @@ def test_both(self):
with settings(key_filename=["bizbaz.pub", "whatever.pub"]):
expected = ["bizbaz.pub", "whatever.pub", "foobar.pub"]
eq_(key_filenames(), expected)
-
- def test_specific_host(self):
- """
- SSH lookup aspect should correctly select per-host value
- """
- with settings(
- use_ssh_config=True,
- ssh_config_path=support("ssh_config"),
- host_string="myhost"
- ):
- eq_(key_filenames(), ["neighbor.pub"])

0 comments on commit 1de917a

Please sign in to comment.