入职第一天,先把所有代理都搞了,不然上不了网。总结一下。
1.git代理设置
执行下面两条语句
git config --global http.proxy proxy.neusoft.com:8080
git config --global https.proxy proxy.neusoft.com:8080
如果需要用户名和密码
git config --global http.proxy http://user:password@proxy.neusoft.com:8080
git config --global https.proxy https://user:password@proxy.neusoft.com:8080
删除代理
git config --system (或 --global 或 --local) --unset http.proxy
git config --system (或 --global 或 --local) --unset https.proxy
2.foxmail代理设置
3.cmd设置代理
首先打开 cmd,然后输入如下命令:
set http_proxy=http://proxy.neusoft.com:8080
如果你的代理服务器要求用户名和密码的话,那么还需要:
set http_proxy_user=你的用户名
set http_proxy_pass=你的密码
设置完成后,就可以在 cmd
下正常使用网络了。
4.NodeJS设置代理
npm config set proxy http://server:port
npm config set https-proxy http://server:port
如果需要认证的话可以这样设置:
npm config set proxy http://username:password@proxy.neusoft.com:8080
npm config set https-proxy http://username:password@proxy.neusoft.com:8080
5. Visual Studio Code 代理设置
1、按F1,在弹出的搜索框输入open user settings;
2、右上角选择“工作区设置”
2、在右侧settings.json文本中添加如下内容: