Skip to content

sshcon: remove use of self.ssh_conf#2993

Merged
milas merged 2 commits into
docker:masterfrom
glicht:glicht-sshcon-patch-1
Jul 26, 2022
Merged

sshcon: remove use of self.ssh_conf#2993
milas merged 2 commits into
docker:masterfrom
glicht:glicht-sshcon-patch-1

Conversation

@glicht
Copy link
Copy Markdown
Contributor

@glicht glicht commented May 31, 2022

Use of self.ssh_conf was left over after being removed at the following PR: #2846

This PR removes the use of it and uses host_config instead.

Encountered this when trying to use an ssh based DOCKER_HOST which uses a ProxyCommand config. Was getting the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/glicht/.pyenv/versions/3.10.1/lib/python3.10/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/Users/glicht/.pyenv/versions/3.10.1/lib/python3.10/site-packages/docker/api/client.py", line 171, in __init__
    self._custom_adapter = SSHHTTPAdapter(
  File "/Users/glicht/.pyenv/versions/3.10.1/lib/python3.10/site-packages/docker/transport/sshconn.py", line 176, in __init__
    self._create_paramiko_client(base_url)
  File "/Users/glicht/.pyenv/versions/3.10.1/lib/python3.10/site-packages/docker/transport/sshconn.py", line 207, in _create_paramiko_client
    self.ssh_conf['proxycommand']
AttributeError: 'SSHHTTPAdapter' object has no attribute 'ssh_conf'

Signed-off-by: Guy Lichtman <glicht@users.noreply.github.com>
@glicht glicht force-pushed the glicht-sshcon-patch-1 branch from 8d15988 to f807e43 Compare May 31, 2022 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants