host或者碼雲啥的都各有自己的缺點:
host:目標ip變了需要多次更改,不能一次設置一直生效
碼雲:碼雲本身克隆github也很慢
本文主要記錄通過代理的方式進行配置,如果不懂或不具備這個前提請自覺點擊x退出。
方案一:下載:代理方式選擇全局,然後直接down
方案二:clone:
MAC:
設置代理:
git config --global http.proxy 'socks5://127.0.0.1:1086'
git config --global https.proxy 'socks5://127.0.0.1:1086'
取消代理:
git config --global --unset http.proxy
git config --global --unset https.proxy
最後這個端口我用的是“高級設置”-》“本地Socks5 監聽端口”
Windows:
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080