​welcome to my blog​

问题: 使用hexo搭建博客, 执行​​hexo init​​时包含git clone的操作,但是使用的是https协议, 不是ssh, 所以为git设置https代理, 但是只设置https代理并不能加速, 与此同时, 只设置http代理能稍微加点速度, 只有同时设置http代理和https代理才能明显提速, 说明hexo init过程中既用到了http协议又用到了https协议

为git设置http代理, https代理

#http代理
git config --global http.proxy 'socks5://127.0.0.1:1080'
#https代理
git config --global https.proxy 'socks5://127.0.0.1:1080'

执行​​git config -l​​查看代理

成功解决 git设置http代理 https代理 取消代理_git

取消http代理, 取消https代理

#取消http代理
git config --global --unset http.proxy
#取消https代理
git config --global --unset https.proxy