配置旁路代理
此文章以192.168.10.2为主机、7891端口为例,简要介绍代理配置
临时设置
在当前终端会话中设置代理:
export HTTP_PROXY="http://192.168.10.2:7890"
export HTTPS_PROXY="http://192.168.10.2:7890"
永久性代理
将代理设置添加到你的 shell 配置文件中(例如 .bashrc
或 .zshrc
):
echo 'export HTTP_PROXY="http://192.168.10.2:7890"' >> ~/.bashrc
echo 'export HTTPS_PROXY="http://192.168.10.2:7890"' >> ~/.bashrc
source ~/.bashrc
git代理设置
查看当前代理设置
git config --global --get http.proxy
git config --global --get https.proxy
清楚代理设置
git config --global --unset http.proxy
git config --global --unset https.proxy
配置代理
git config --global http.proxy http://192.168.10.2:7890
git config --global https.proxy https://192.168.10.2:7890
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果