git - Gitlab SSH在花费一些时间后给出连接超时错误
问题描述
我在通过 SSH 访问 Gitlab 时遇到问题。它工作正常,直到一周前 gitlab 操作停止工作并且在花费大量时间后给出连接超时错误。我阅读了类似的问题,他们建议通过运行命令进行检查ssh -Tv git@gitlab.com
,我得到的输出是
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to gitlab.com [172.65.251.78] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /home/emumba/.ssh/id_gitlab type 3
debug1: key_load_public: No such file or directory
debug1: identity file /home/emumba/.ssh/id_gitlab-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
它卡在这一点上。我已经尝试添加一个新密钥,但它仍然不起作用。HTTPS 工作正常,但我需要使用 SSH
解决方案
首先检查网络中不同工作站的问题是否仍然存在(假设是企业设置)。
对于个人家庭设置,考虑到连接已建立,不应该有任何防火墙问题。
然后检查您的环境变量是否有任何与 SSH 相关的内容:
env|grep -i SSH
git config -l | grep -i ssh
推荐阅读
- swift - UIPageViewControllers UIPageControl 在过渡期间出现故障
- mongodb - 更改名称聚合字段 mongodb
- python - 如何向我的 td 添加增量 ID?
- docker - AlertManager - 容器警报未返回其运行的主机名
- c# - Autofac DI 和存储库模式的上下文处理错误
- javascript - 带有状态的 React HOC 错误
- json - 错误:avro 解析和修改 json
- javascript - 在方法对象上循环 Pomise
- c++ - C++ MFC StretchDIBits PixelFormat8bppIndexed
- java - 如何将我给定的字符串转换为日期格式?