一、问题描述
今天在读书馆学习,push推送代码到github时,推送失败了,git pull、git clone都失败
报错主要内容如下:
kex_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.
说明一下:此时我本地的github工程,使用的是git clone SSH-url拉取下来的
二、导致原因
1、网络问题
同样的项目,使用手机热点连接笔记本,git pull正常,但是连接读书馆的wifi进行git pull就报错
如图:
解决办法:
要么不使用读书馆的wifi,要么将git clone SSH-url换成git clone HTTPS-url,重新拉取代码
不过一般都是本地改了代码的,重新拉代码不太可能,所以还是使用