一、Git限制了推送數據的大小導致的錯誤。
解決:重新設置通信緩存大小
git config --global http.postBuffer 524288000
二、GitHub.com無法訪問,連接超時
分析:懷疑連接不到github.com,在cmd窗口中,嘗試ping一下百度。
命令窗口:ping www.baidu.com
然后再ping一下github.com
C:\Users\Bai>ping github.com
正在 Ping github.com [111.13.100.91] 具有 32 字節的數據:
請求超時。
請求超時。
請求超時。
請求超時。
111.13.100.91 的 Ping 統計信息:
數據包: 已發送 = 4,已接收 = 0,丟失 = 4 (100% 丟失),
確實ping不通。
因此懷疑是:本地DNS無法解析導致的。
三、錯誤解決
打開C:\Windows\System32\drivers\etc\hosts,
確實沒有github.com的解析
在文件末尾添加如下內容,並保存:
192.30.255.112 github.com git
185.31.16.184 github.global.ssl.fastly.net
重啟cmd窗口,繼續ping一下github.com:
三、今天(2019-11-19)又遇到了
上述辦法都嘗試了還是不行,於是我這樣做成功了
git clone https://github.com/xxx.git
提示下載失敗,
可以嘗試把https://換成 git://
git clone git://github.com/xxx.git