github连接报 “ssh: connect to host github.com port 22: Connection timed out” 错误
这个是github服务器的问题,端口连接超时,那么可以修改端口解决问题。
在.ssh文件夹下新建config文件。
文件内填上如下内容:
Host github.com
User XX账号@qq.com
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
这样就可以解决超时问题。
github 使用git pull/push 速度缓慢
首先在DNS查询网站http://tool.chinaz.com/dns/上查询github的耗时最少的DNS,
访问:https://www.ipaddress.com/ 网址 依次获取以下三个网址的IP
1.github.com
2.github.global.ssl.fastly.net
3.codeload.github.com
然后填写到
在cmd中,执行dns刷新操作
ipconfig /flushdns
接下来在pull,push速度会非常快,爽歪歪,再也不用等很久了。
git pull的时候,The remote end hung up unexpectedly错误
stackoverflow上说缓冲区溢出了,要
git config http.postBuffer 524288000
但并没有什么卵用,还是报错,折腾了一天,还是还能把代码克隆下来,由于新到公司,深感到绝望。
期间把Git卸载重装了好几次,也没什么卵用。
直到今天,才找到真正的原因,公司网络比较缓慢情况下,就断开了
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
增加最低速度时间,总算把代码克隆下来了。