fix: 修复 ssh 私钥推送等问题

This commit is contained in:
Eric
2022-12-13 14:26:59 +08:00
committed by Eric_Lee
parent 024beca690
commit 8979228e0b
2 changed files with 14 additions and 10 deletions

View File

@@ -79,7 +79,7 @@ _supported_paramiko_ssh_key_types = (
def ssh_key_string_to_obj(text, password=None):
key = None
for ssh_key_type in _supported_paramiko_ssh_key_types:
if not isinstance(ssh_key_type, paramiko.PKey):
if not issubclass(ssh_key_type, paramiko.PKey):
continue
try:
key = ssh_key_type.from_private_key(StringIO(text), password=password)