terminal代理设置

ubuntu、linux下terminal终端http和git代理设置

#http代理设置(只在当前 shell 生效)

1
2
3
4
5
export http_proxy=http://127.0.0.1:1080
export https_proxy=http://127.0.0.1:1080

export http_proxy=socks5://127.0.0.1:1087
export https_proxy=socks5://127.0.0.1:1087

#http代理查看

1
2
echo $http_proxy
echo $https_proxy

#git代理设置

1
2
3
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 core.gitproxy http://127.0.0.1:1080

#查看http、https代理配置情况

1
2
3
git config --global --get http.proxy
git config --global --get https.proxy
git config --global --get core.gitproxy

#取消http、https代理配置

1
2
3
git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy
1
2
3
4
5
6
7
8
9
10

git config --global user.email "xiaoli.xia@clife.cn"
git config --global user.name "uuxia"

repo init -u https://github.com/PixelExperience/manifest -b twelve
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags

cd ~/android/pe
repo init -u https://github.com/PixelExperience/manifest -b twelve