From cafb0811b5015f46d40e3197d904e2e2d57c8573 Mon Sep 17 00:00:00 2001 From: jingrow Date: Thu, 21 Aug 2025 22:45:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bench/utils/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bench/utils/__init__.py b/bench/utils/__init__.py index d2170c2..1e204c0 100644 --- a/bench/utils/__init__.py +++ b/bench/utils/__init__.py @@ -442,7 +442,7 @@ def find_org(org_repo, using_cached: bool = False): # 1. 检测 SSH 配置 ssh_available = _check_ssh_availability() - print(f"SSH detection result: {ssh_available}") + print(f"SSH availability: {ssh_available}") # 2. SSH 优先尝试 if ssh_available: @@ -453,7 +453,7 @@ def find_org(org_repo, using_cached: bool = False): return org, org_repo # 3. HTTP 回退 - print("Falling back to HTTP method...") + print("Try HTTP method...") username, password = _get_http_credentials() for org in ["jingrow", "jerp"]: if _try_http_access(org, org_repo, username, password): @@ -474,7 +474,6 @@ def _check_ssh_availability(): try: # 直接测试 SSH 连接(使用配置的端口) ssh_cmd = ['ssh', '-p', str(GIT_SSH_PORT), '-T', f'{GIT_SSH_USER}@{GIT_SSH_HOST}'] - print(f"SSH connection test command: {' '.join(ssh_cmd)}") result = subprocess.run( ssh_cmd, @@ -482,14 +481,11 @@ def _check_ssh_availability(): text=True, timeout=10 ) - print(f"SSH connection test: returncode={result.returncode}, stdout='{result.stdout}', stderr='{result.stderr}'") # SSH 成功或认证失败都说明 SSH 可用(returncode 0 或 1) ssh_available = result.returncode in [0, 1] - print(f"SSH availability: {ssh_available}") return ssh_available except Exception as e: - print(f"SSH detection exception: {e}") return False