{"meta":{"title":"错误：文件编号错误","intro":"此错误通常表示您无法连接到服务器。 这通常由防火墙和代理服务器造成。","product":"身份验证","breadcrumbs":[{"href":"/zh/enterprise-server@3.21/authentication","title":"身份验证"},{"href":"/zh/enterprise-server@3.21/authentication/troubleshooting-ssh","title":"SSH 故障排除"},{"href":"/zh/enterprise-server@3.21/authentication/troubleshooting-ssh/error-bad-file-number","title":"错误：文件编号错误"}],"documentType":"article"},"body":"# 错误：文件编号错误\n\n此错误通常表示您无法连接到服务器。 这通常由防火墙和代理服务器造成。\n\n运行远程 Git 命令或 SSH 时，您的连接可能会超时：\n\n```shell\n$ ssh -vT git@HOSTNAME\n> OpenSSH_8.1p1, LibreSSL 2.7.3\n> debug1: Connecting to HOSTNAME [207.97.227.239] port 22.\n> debug1: connect to address 207.97.227.239 port 22: Connection timed out\n> ssh: connect to host HOSTNAME port 22: Connection timed out\n> ssh: connect to host HOSTNAME port 22: Bad file number\n```\n\n## 解决问题\n\n### 使用 HTTPS\n\n通常，最简单的解决方案是完全避免使用 SSH。 大多数防火墙和代理都允许无问题的 HTTPS 流量。 若要利用这一点，请更改你正在使用的[远程 URL](/zh/enterprise-server@3.21/get-started/git-basics/about-remote-repositories)：\n\n```shell\n$ git clone https://HOSTNAME/USERNAME/REPO-NAME.git\n> Cloning into 'reponame'...\n> remote: Counting objects: 84, done.\n> remote: Compressing objects: 100% (45/45), done.\n> remote: Total 84 (delta 43), reused 78 (delta 37)\n> Unpacking objects: 100% (84/84), done.\n```\n\n### 在不同的网络上进行测试\n\n如果你将计算机连接至无防火墙的其他网络，可尝试测试到 GitHub 的 SSH 连接。 如果一切正常，请与网络管理员联系，获取有关更改防火墙设置的帮助，以使 SSH 连接成功。"}