具体问题情况:
gitlab部署在阿里云上,公司网络环境下拉取一直正常,结果某天下午的时候出现以下报错:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
排查问题流程:
1.经验不足,看到ssh_exchange_identification 第一次反应是gitlab上的密钥文件丢失,或者是gitlab的白名单配置问题,排查过后发现没问题
2.ssh问题,初步判断是ssh的连接数不够
vi /etc/ssh/sshd_config -------无效
3.ssh -v git@git地址 无异常
4.很纳闷 然后手动telnet git地址端口,发现telnet成功后直接被断开,检查过安全组及防火墙策略都没问题,接着用阿里云的服务器去telnet一切正常,最后判断是阿里云那边做了保护屏蔽错误
Connectionclosed by foreign host. # 被远程断开
解决过程:
提工单向阿里客服人员反馈,给的解释是公司出口ip对该服务器多次访问失败或频繁访问,需要再安骑士中安全配置添加ip白名单 ,添加后访问gitlab正常