1.問題原因
報錯資訊:
fatal: unable to access 'https://github.com/xxx/autowrite.git/':
OpenSSL SSL_read: Connection was reset, errno 10054
又或者
fatal: unable to access 'https://github.com/xxx/autowrite.git/':
Failed to connect to github.com port 443: Timed out
因為git在拉取或者送出項目時,中間會有git的http和https代理,但是我們本地環境本身就有SSL協定了,是以取消git的https代理即可,不行再取消http的代理。
後續
原因還有一個,目前代理網速過慢,是以偶爾會成功,偶爾失敗。
2.解決方案
1.在項目檔案夾的指令行視窗執行下面代碼,然後再git commit 或git clone
取消git本身的https代理,使用自己本機的代理,如果沒有的話,其實預設還是用git的
//取消http代理
git config --global --unset http.proxy
//取消https代理
git config --global --unset https.proxy
2.科學上網(vpn)
這樣就能提高伺服器連接配接速度,能從根本解決 time out 443問題