目录

Windows 命令行设置代理

来源

git 命令设置代理

设置永久有效

git config --global https.proxy http://127.0.0.1:10809
git config --global https.proxy https://127.0.0.1:10809
git config --global http.proxy 'socks5://127.0.0.1:10808'
git config --global https.proxy 'socks5://127.0.0.1:10808'
git config --global --list	#查询代理设置

PowerShell 代理设置

设置仅本次有效

$env:HTTP_PROXY="127.0.0.1:10809"
$env:HTTPS_PROXY="127.0.0.1:10809"

CMD 代理设置

设置内容仅本次有效

set HTTP_PROXY=127.0.0.1:10809
set HTTPS_PROXY=127.0.0.1:10809