现在很多公司因为安全原因,很多都是内网使用代理上外网,但是这也造成很多开发人员不便,下面我将简单介绍一下如何在代理下使用git 和node的npm
1.git
git 使用代理命令
git config --global http.proxy http://xxx:10110
git config --global https.proxy https://xxx:10110
git 取消使用代理命令
git config --global --unset http.proxy
git config --global --unset https.proxy
2.npm
npm 使用代理命令
npm config set proxy http://xxx:10110
npm config set https-proxy https://xxx:10110
有时可能还要使用
npm config set strict-ssl false
npm取消使用代理命令
npm config delete proxy