Loading

在Windows和Linux终端下使用代理的方式

背景

在快乐上网的时候,网页会经过代理,但是有些在终端运行的程序不一定会经过代理,比如用git clone github仓库的时候,或者curl 下载github release的时候,如果不走代理,下载可能会很慢很慢。

Windows

在执行git clone前,在终端执行

set https_proxy=http://localhost:7890
set http_proxy=http://localhost:7890

清除代理,留空就可以了

set https_proxy=
set http_proxy=

Linux

同样的,在执行命令前先执行

export https_proxy=http://localhost:7890
export http_proxy=http://localhost:7890

清除代理

export https_proxy=
export http_proxy=
posted @ 2023-10-27 14:34  马卡龙MK  阅读(135)  评论(0编辑  收藏  举报