Skip to content

key_filename value from Collection.config and config file is not passed on connect to paramiko #1762

Description

@garu57

Python 3.6.5, Invoke 1.0.0, fabric 2.0.0, paramiko 2.4.1

First of all the argument is called key_filenames in documentation, but if used that way gives:
TypeError: connect() got an unexpected keyword argument 'key_filenames'

But the real problem is that either using it in Collection.confg or fabric.yaml or both, key_filename value is not passed to paramiko.
It looks like during the config merge phase it is detected, but overridden with an empty one {'connect_kwargs': {'key_filename': []}}, leading to exception:
paramiko.ssh_exception.SSHException: No authentication methods available

Launching fab -d -H c04801029 check-login > c:\tmp\fab.log 2>&1.
Debug log: fab.log

Here you see the key_filename initialized from fabric.yaml

connect_kwargs:
  key_filename: 
    - C:/home/ProjectsDoc/Tech/ssh_keys/21047012@ib024.priv
user: root

but initializing it from Collection.config or both together gives the very same result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions