解决虚拟机下git出现Could not resolve proxy: https的错误
一、环境
VMWare+Ubuntu1604
二、解决方法
方法1
查看是否使用git代理
git config --global http.proxy
git config --global https.proxy
若有,则unset
git config --global --unset http.proxy
git config --global --unset https.proxy
方法2
查询系统代理
env|grep -i proxy
结果(因系统而异)
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=
all_proxy=socks://127.0.0.1:1080/
ALL_PROXY=socks://127.0.0.1:1080/
socks_proxy=socks://127.0.0.1:1080/
https_proxy=
HTTPS_PROXY=http://https://127.0.0.1:12333/
no_proxy=localhost,127.0.0.0/8,::1
HTTP_PROXY=http://http://127.0.0.1:12333/
取消系统代理
注:会影响ssr等代理的使用
unset http_proxy
unset https_proxy
unset no_proxy
unset all_proxy
export http_proxy=""
export https_proxy=""
export HTTP_PROXY=""
export HTTPS_PROXY=""
export ALL_PROXY=""
方法3
重新设置git代理,走ssr代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
方法4
重装git