添加http代理
git config --global http.proxy "http://127.0.0.1:8001"
git config --global https.proxy "http://127.0.0.1:8001"
這里的端口要根據自已在代理中設置的。
取消設置
git config --global --unset http.proxy
git config --global --unset https.proxy
clone代碼
命令:git clone https://github.com/owner/git.git,此時會讓你輸入用戶名和密碼。
如果在git clone時報RPC failed; curl 18 transfer closed with outstanding read data remaining 錯誤,請查看這個解決方法。