From b2b6d2ac1e0090662e84d7eeec573d89d212e4e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Sat, 13 Jul 2024 15:34:08 +0530 Subject: [PATCH] Fix: hostname in logging (#2914) Co-authored-by: tobitege --- opendevin/runtime/docker/ssh_box.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opendevin/runtime/docker/ssh_box.py b/opendevin/runtime/docker/ssh_box.py index 63f476114d..fffe5a21e3 100644 --- a/opendevin/runtime/docker/ssh_box.py +++ b/opendevin/runtime/docker/ssh_box.py @@ -419,7 +419,8 @@ class DockerSSHBox(Sandbox): else: password_msg = f"using the password '{self._ssh_password}'" logger.info('Connecting to SSH session...') - ssh_cmd = f'`ssh -v -p {self._ssh_port} {username}@{hostname}`' + hostname_to_log = hostname.replace('host.docker.internal', 'localhost') + ssh_cmd = f'`ssh -v -p {self._ssh_port} {username}@{hostname_to_log}`' logger.info( f'You can debug the SSH connection by running: {ssh_cmd} {password_msg}' )