設置當前代理為 http://127.0.0.1:1080 或 socket5://127.0.0.1:1080:
git config --global http.proxy 'http://127.0.0.1:1080' git config --global https.proxy 'http://127.0.0.1:1080' git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'
查看當前代理:
git config --global --get http.proxy git config --global --get https.proxy
查詢的時候沒有打印任何東西證明沒有設置代理,如果設置了代理就會直接顯示
刪除代理:
git config --global --unset http.proxy git config --global --unset https.proxy
參考鏈接:https://www.cnblogs.com/yongy1030/p/11699086.html
https://blog.csdn.net/qq_29364417/article/details/85940097
https://baijiahao.baidu.com/s?id=1606573801465636505&wfr=spider&for=pc