npm设置代理
npm?config?set?proxy?? npm?config?set?https-proxy?http://server:port
npm配置文件~.npmrc
设置代理:
git?config?--global?http.proxy?proxy-url:proxy-port
?more .gitconfig
[https]
[http "https://github.com"]
proxy = socks5://127.0.0.1:10808
[https "https://github.com"]
proxy = socks5://127.0.0.1:10808
npm 跟git proxy要使用不同的端口,尤其是使用git 访问github.com拉取依赖网络不通的时候,通过区别与npm? proxy的端口
亲测试验有效
原文:https://blog.51cto.com/lookingdream/2869879