開啟v2ray后,默認(rèn)端口是10808
對于git的使用,可以配置相應(yīng)的代理,具體如下:
使用以下命令開啟socks代理
git config --global http.proxy socks://127.0.0.1:10808
git config --global https.proxy socks://127.0.0.1:10808
使用以下命令開啟http代理
git config --global http.proxy http://127.0.0.1:10808
git config --global https.proxy https://127.0.0.1:10808
注意:
socks代理與http代理不能同時配置,因?yàn)閏onfig的key相同,會造成覆蓋
驗(yàn)證
配置完成后,可以通過 git config --list 查看配置文章來源:http://www.zghlxwxcb.cn/news/detail-601636.html
git config --list
刪除github代理
當(dāng)不需要代理的時候,可以使用如下命令進(jìn)行刪除:文章來源地址http://www.zghlxwxcb.cn/news/detail-601636.html
git config --global --unset http.proxy
git config --global --unset https.proxy
到了這里,關(guān)于GIT配置代理服務(wù)器的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!