Github 仓库,执行 git pull 和 git push 时,报错如下:
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.xx.xx port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决:编辑 ~/.ssh/config (如果没有改文件,就新建一个)并输入以下内容:
Host github.com
Hostname ssh.github.com
Port 443
新建文件
touch ~/.ssh/config