通过git将代码push到github仓库出现错误
错误:
kex_exchange_identification: Connection closed by remote host
Connection closed by 198.18.0.11 port 22
fatal: 无法读取远程仓库。
解决
网上查阅资料,有人说是因为挂了VPN导致的,禁止了github的ssh连接,我尝试关掉VPN没有解决问题。
具体解决方法:修改~/.ssh/config
vim ~/.ssh/config
// 加入以下内容
Host github.com
HostName ssh.github.com
User git
Port 443