当前位置:   article > 正文

【错误】kex_exchange_identification: Connection closed by remote hos

kex_exchange_identification: connection closed by remote host

错误描述

git push 的时候出现了下面这个错误

kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

翻译过来就是

远程主机关闭的连接
连接关闭20.205.243.166端口22
致命:无法从远程存储库读取。
请确保您拥有正确的访问权限
并且存储库存在。
  • 1
  • 2
  • 3
  • 4
  • 5

解决方法

杀死端口 22 的进程
Windows下杀死端口22的进程如下:
1、查找占用端口22的进程

netstat -ano | findstr :22
  • 1

下面就是查找到端口22的进程,我用红框标注的是PID,因为我本机没有端口22的进程,所以我就暂时用了其他的端口做为示例
在这里插入图片描述
2、杀死进程
后面的[PID]替换成你查询到的PID号即可

taskkill /pid [PID]
  • 1

之后就解决了

Enumerating objects: 104, done.
Counting objects: 100% (104/104), done.
Delta compression using up to 12 threads
Compressing objects: 100% (43/43), done.
Writing objects: 100% (60/60), 5.20 KiB | 591.00 KiB/s, done.
Total 60 (delta 25), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (25/25), completed with 20 local objects.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/501124
推荐阅读
相关标签
  

闽ICP备14008679号