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